Use TYPE_CHECKING (#6771)
This commit is contained in:
parent
1b30514783
commit
2b13a9b95d
|
@ -795,7 +795,7 @@ class Config:
|
||||||
kwargs=dict(parser=self._parser, pluginmanager=self.pluginmanager)
|
kwargs=dict(parser=self._parser, pluginmanager=self.pluginmanager)
|
||||||
)
|
)
|
||||||
|
|
||||||
if False: # TYPE_CHECKING
|
if TYPE_CHECKING:
|
||||||
from _pytest.cacheprovider import Cache
|
from _pytest.cacheprovider import Cache
|
||||||
|
|
||||||
self.cache = None # type: Optional[Cache]
|
self.cache = None # type: Optional[Cache]
|
||||||
|
|
|
@ -13,10 +13,11 @@ import pytest
|
||||||
from _pytest import outcomes
|
from _pytest import outcomes
|
||||||
from _pytest import reports
|
from _pytest import reports
|
||||||
from _pytest import runner
|
from _pytest import runner
|
||||||
|
from _pytest.compat import TYPE_CHECKING
|
||||||
from _pytest.config import ExitCode
|
from _pytest.config import ExitCode
|
||||||
from _pytest.outcomes import OutcomeException
|
from _pytest.outcomes import OutcomeException
|
||||||
|
|
||||||
if False: # TYPE_CHECKING
|
if TYPE_CHECKING:
|
||||||
from typing import Type
|
from typing import Type
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue