Skip to content

Commit

Permalink
Manual typing fix
Browse files Browse the repository at this point in the history
import AbstractSet => from collections.abc import Set as AbstractSet
and others
  • Loading branch information
Pierre-Sassoulas committed Oct 10, 2024
1 parent 6ce2e97 commit 3f03eda
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/_pytest/assertion/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
from collections.abc import Iterable
from collections.abc import Mapping
from collections.abc import Sequence
from collections.abc import Set as AbstractSet
import os
import pprint
from typing import AbstractSet
from typing import Any
from typing import Callable
from typing import Literal
Expand Down
1 change: 0 additions & 1 deletion src/_pytest/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
from typing import final
from typing import IO
from typing import TextIO
from typing import Type
from typing import TYPE_CHECKING
import warnings

Expand Down
2 changes: 1 addition & 1 deletion src/_pytest/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
from collections.abc import Mapping
from collections.abc import MutableMapping
from collections.abc import Sequence
from collections.abc import Set as AbstractSet
import dataclasses
import functools
import inspect
import os
from pathlib import Path
import sys
import types
from typing import AbstractSet
from typing import Any
from typing import Callable
from typing import cast
Expand Down
2 changes: 1 addition & 1 deletion src/_pytest/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from collections.abc import Generator
from collections.abc import Mapping
from collections.abc import Set as AbstractSet
from contextlib import contextmanager
from contextlib import nullcontext
from datetime import datetime
Expand All @@ -18,7 +19,6 @@
from pathlib import Path
import re
from types import TracebackType
from typing import AbstractSet
from typing import final
from typing import Generic
from typing import Literal
Expand Down
2 changes: 1 addition & 1 deletion src/_pytest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from collections.abc import Iterable
from collections.abc import Iterator
from collections.abc import Sequence
from collections.abc import Set as AbstractSet
import dataclasses
import fnmatch
import functools
Expand All @@ -14,7 +15,6 @@
import os
from pathlib import Path
import sys
from typing import AbstractSet
from typing import Callable
from typing import final
from typing import Literal
Expand Down
2 changes: 1 addition & 1 deletion src/_pytest/mark/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import collections
from collections.abc import Collection
from collections.abc import Iterable
from collections.abc import Set as AbstractSet
import dataclasses
from typing import AbstractSet
from typing import Optional
from typing import TYPE_CHECKING

Expand Down
4 changes: 2 additions & 2 deletions src/_pytest/python_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from collections.abc import Mapping
from collections.abc import Sequence
from collections.abc import Sized
from contextlib import AbstractContextManager
from decimal import Decimal
import math
from numbers import Complex
Expand All @@ -15,7 +16,6 @@
from typing import Any
from typing import Callable
from typing import cast
from typing import ContextManager
from typing import final
from typing import overload
from typing import TYPE_CHECKING
Expand Down Expand Up @@ -978,7 +978,7 @@ def raises(


@final
class RaisesContext(ContextManager[_pytest._code.ExceptionInfo[E]]):
class RaisesContext(AbstractContextManager[_pytest._code.ExceptionInfo[E]]):
def __init__(
self,
expected_exception: type[E] | tuple[type[E], ...],
Expand Down

0 comments on commit 3f03eda

Please sign in to comment.