Skip to content

Commit

Permalink
Use TYPE_CHECKING (#6771)
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed committed Feb 19, 2020
1 parent 1b30514 commit 2b13a9b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/_pytest/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ def __init__(self, pluginmanager, *, invocation_params=None) -> None:
kwargs=dict(parser=self._parser, pluginmanager=self.pluginmanager)
)

if False: # TYPE_CHECKING
if TYPE_CHECKING:
from _pytest.cacheprovider import Cache

self.cache = None # type: Optional[Cache]
Expand Down
3 changes: 2 additions & 1 deletion testing/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
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

if False: # TYPE_CHECKING
if TYPE_CHECKING:
from typing import Type


Expand Down

0 comments on commit 2b13a9b

Please sign in to comment.