py36+: remove TYPE_CHECKING from _pytest.compat
automated with:
```bash
git grep -l 'from .* import TYPE_CHECKING' |
xargs reorder-python-imports \
--application-directories .:src \
--remove-import 'from _pytest.compat import TYPE_CHECKING' \
--add-import 'from typing import TYPE_CHECKING'
```
This commit is contained in:
@@ -7,6 +7,7 @@ import textwrap
|
||||
from typing import Any
|
||||
from typing import Dict
|
||||
from typing import Tuple
|
||||
from typing import TYPE_CHECKING
|
||||
from typing import Union
|
||||
|
||||
import py
|
||||
@@ -17,7 +18,6 @@ from _pytest._code.code import ExceptionChainRepr
|
||||
from _pytest._code.code import ExceptionInfo
|
||||
from _pytest._code.code import FormattedExcinfo
|
||||
from _pytest._io import TerminalWriter
|
||||
from _pytest.compat import TYPE_CHECKING
|
||||
from _pytest.pytester import LineMatcher
|
||||
|
||||
try:
|
||||
|
||||
@@ -2,6 +2,7 @@ import enum
|
||||
import sys
|
||||
from functools import partial
|
||||
from functools import wraps
|
||||
from typing import TYPE_CHECKING
|
||||
from typing import Union
|
||||
|
||||
import pytest
|
||||
@@ -12,7 +13,6 @@ from _pytest.compat import get_real_func
|
||||
from _pytest.compat import is_generator
|
||||
from _pytest.compat import safe_getattr
|
||||
from _pytest.compat import safe_isclass
|
||||
from _pytest.compat import TYPE_CHECKING
|
||||
from _pytest.outcomes import OutcomeException
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
||||
@@ -6,6 +6,7 @@ from typing import Dict
|
||||
from typing import List
|
||||
from typing import Sequence
|
||||
from typing import Tuple
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import attr
|
||||
import py.path
|
||||
@@ -13,7 +14,6 @@ import py.path
|
||||
import _pytest._code
|
||||
import pytest
|
||||
from _pytest.compat import importlib_metadata
|
||||
from _pytest.compat import TYPE_CHECKING
|
||||
from _pytest.config import _get_plugin_specs_as_list
|
||||
from _pytest.config import _iter_rewritable_modules
|
||||
from _pytest.config import _strtobool
|
||||
|
||||
@@ -4,13 +4,13 @@ from datetime import datetime
|
||||
from typing import cast
|
||||
from typing import List
|
||||
from typing import Tuple
|
||||
from typing import TYPE_CHECKING
|
||||
from xml.dom import minidom
|
||||
|
||||
import py
|
||||
import xmlschema
|
||||
|
||||
import pytest
|
||||
from _pytest.compat import TYPE_CHECKING
|
||||
from _pytest.config import Config
|
||||
from _pytest.junitxml import bin_xml_escape
|
||||
from _pytest.junitxml import LogXML
|
||||
|
||||
@@ -4,11 +4,11 @@ import sys
|
||||
import textwrap
|
||||
from typing import Dict
|
||||
from typing import Generator
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import py
|
||||
|
||||
import pytest
|
||||
from _pytest.compat import TYPE_CHECKING
|
||||
from _pytest.monkeypatch import MonkeyPatch
|
||||
from _pytest.pytester import Testdir
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import types
|
||||
from typing import Dict
|
||||
from typing import List
|
||||
from typing import Tuple
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import py
|
||||
|
||||
@@ -13,7 +14,6 @@ import pytest
|
||||
from _pytest import outcomes
|
||||
from _pytest import reports
|
||||
from _pytest import runner
|
||||
from _pytest.compat import TYPE_CHECKING
|
||||
from _pytest.config import ExitCode
|
||||
from _pytest.outcomes import OutcomeException
|
||||
|
||||
|
||||
Reference in New Issue
Block a user