Skip to content

Commit a6c3add

Browse files
committed
Revert "_pytest.compat.Type"
This reverts commit af3ef73.
1 parent 01c7bb7 commit a6c3add

File tree

10 files changed

+10
-13
lines changed

10 files changed

+10
-13
lines changed

src/_pytest/_code/code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
from _pytest.compat import TYPE_CHECKING
3636

3737
if TYPE_CHECKING:
38-
from _pytest.compat import Type
38+
from typing import Type
3939
from typing_extensions import Literal
4040
from weakref import ReferenceType # noqa: F401
4141

src/_pytest/compat.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@
3232
from typing import TYPE_CHECKING
3333

3434
if TYPE_CHECKING:
35-
if sys.version_info < (3, 5, 2):
36-
from typing_extensions import Type
37-
else:
38-
from typing import Type # noqa: F401 (used in type string)
35+
from typing import Type # noqa: F401 (used in type string)
3936

4037

4138
_T = TypeVar("_T")

src/_pytest/config/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
from _pytest.warning_types import PytestConfigWarning
4545

4646
if TYPE_CHECKING:
47-
from _pytest.compat import Type
47+
from typing import Type
4848

4949
from .argparsing import Argument
5050

src/_pytest/doctest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
if TYPE_CHECKING:
2929
import doctest
30-
from _pytest.compat import Type
30+
from typing import Type
3131

3232
DOCTEST_REPORT_CHOICE_NONE = "none"
3333
DOCTEST_REPORT_CHOICE_CDIFF = "cdiff"

src/_pytest/fixtures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from _pytest.outcomes import TEST_OUTCOME
3535

3636
if TYPE_CHECKING:
37-
from _pytest.compat import Type
37+
from typing import Type
3838

3939
from _pytest import nodes
4040
from _pytest.main import Session

src/_pytest/pytester.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
from _pytest.reports import TestReport
3838

3939
if TYPE_CHECKING:
40-
from _pytest.compat import Type
40+
from typing import Type
4141

4242

4343
IGNORE_PAM = [ # filenames added when obtaining details about the current user

src/_pytest/python_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
from _pytest.outcomes import fail
2828

2929
if TYPE_CHECKING:
30-
from _pytest.compat import Type # noqa: F401 (used in type string)
30+
from typing import Type # noqa: F401 (used in type string)
3131

3232

3333
BASE_TYPE = (type, STRING_TYPES)

src/_pytest/recwarn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from _pytest.outcomes import fail
1818

1919
if TYPE_CHECKING:
20-
from _pytest.compat import Type
20+
from typing import Type
2121

2222

2323
@yield_fixture

src/_pytest/runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from _pytest.outcomes import TEST_OUTCOME
2323

2424
if TYPE_CHECKING:
25-
from _pytest.compat import Type
25+
from typing import Type
2626

2727
#
2828
# pytest plugin hooks

src/_pytest/warning_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from _pytest.compat import TYPE_CHECKING
88

99
if TYPE_CHECKING:
10-
from _pytest.compat import Type # noqa: F401 (used in type string)
10+
from typing import Type # noqa: F401 (used in type string)
1111

1212

1313
class PytestWarning(UserWarning):

0 commit comments

Comments
 (0)