File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 11# PYTHON_ARGCOMPLETE_OK
22"""pytest: unit and functional testing with Python."""
3+ from typing import TYPE_CHECKING
4+
35from _pytest import __version__
46from _pytest import version_tuple
57from _pytest ._code import ExceptionInfo
165167 "yield_fixture" ,
166168]
167169
170+ if not TYPE_CHECKING :
168171
169- def __getattr__ (name : str ) -> object :
170- if name == "Instance" :
171- # The import emits a deprecation warning.
172- from _pytest .python import Instance
173-
174- return Instance
175- raise AttributeError (f"module { __name__ } has no attribute { name } " )
172+ def __getattr__ (name : str ) -> object :
173+ if name == "Instance" :
174+ # The import emits a deprecation warning.
175+ from _pytest .python import Instance
176+
177+ return Instance
178+ raise AttributeError (f"module { __name__ } has no attribute { name } " )
You can’t perform that action at this time.
0 commit comments