Skip to content

Commit

Permalink
Revert "_pytest.compat.Type"
Browse files Browse the repository at this point in the history
This reverts commit af3ef73.
  • Loading branch information
blueyed committed Jan 14, 2020
1 parent cbf0e1b commit f88035e
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/_pytest/_code/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from _pytest.compat import TYPE_CHECKING

if TYPE_CHECKING:
from _pytest.compat import Type
from typing import Type
from typing_extensions import Literal
from weakref import ReferenceType # noqa: F401

Expand Down
5 changes: 1 addition & 4 deletions src/_pytest/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@
from typing import TYPE_CHECKING

if TYPE_CHECKING:
if sys.version_info < (3, 5, 2):
from typing_extensions import Type
else:
from typing import Type # noqa: F401 (used in type string)
from typing import Type # noqa: F401 (used in type string)


_T = TypeVar("_T")
Expand Down
2 changes: 1 addition & 1 deletion src/_pytest/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
from _pytest.warning_types import PytestConfigWarning

if TYPE_CHECKING:
from _pytest.compat import Type
from typing import Type

from .argparsing import Argument

Expand Down
2 changes: 1 addition & 1 deletion src/_pytest/doctest.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

if TYPE_CHECKING:
import doctest
from _pytest.compat import Type
from typing import Type

DOCTEST_REPORT_CHOICE_NONE = "none"
DOCTEST_REPORT_CHOICE_CDIFF = "cdiff"
Expand Down
2 changes: 1 addition & 1 deletion src/_pytest/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from _pytest.outcomes import TEST_OUTCOME

if TYPE_CHECKING:
from _pytest.compat import Type
from typing import Type

from _pytest import nodes
from _pytest.main import Session
Expand Down
2 changes: 1 addition & 1 deletion src/_pytest/pytester.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
from _pytest.reports import TestReport

if TYPE_CHECKING:
from _pytest.compat import Type
from typing import Type


IGNORE_PAM = [ # filenames added when obtaining details about the current user
Expand Down
2 changes: 1 addition & 1 deletion src/_pytest/python_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from _pytest.outcomes import fail

if TYPE_CHECKING:
from _pytest.compat import Type # noqa: F401 (used in type string)
from typing import Type # noqa: F401 (used in type string)


BASE_TYPE = (type, STRING_TYPES)
Expand Down
2 changes: 1 addition & 1 deletion src/_pytest/recwarn.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from _pytest.outcomes import fail

if TYPE_CHECKING:
from _pytest.compat import Type
from typing import Type


@yield_fixture
Expand Down
2 changes: 1 addition & 1 deletion src/_pytest/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from _pytest.outcomes import TEST_OUTCOME

if TYPE_CHECKING:
from _pytest.compat import Type
from typing import Type

#
# pytest plugin hooks
Expand Down
2 changes: 1 addition & 1 deletion src/_pytest/warning_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from _pytest.compat import TYPE_CHECKING

if TYPE_CHECKING:
from _pytest.compat import Type # noqa: F401 (used in type string)
from typing import Type # noqa: F401 (used in type string)


class PytestWarning(UserWarning):
Expand Down

0 comments on commit f88035e

Please sign in to comment.