File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 44import warnings
55from typing import Any
66from typing import Callable
7+ from typing import cast
78from typing import Iterable
89from typing import List
910from typing import Mapping
@@ -467,12 +468,14 @@ def test_function():
467468
468469 # See TYPE_CHECKING above.
469470 if TYPE_CHECKING :
470- skip = None # type: _SkipMarkDecorator
471- skipif = None # type: _SkipifMarkDecorator
472- xfail = None # type: _XfailMarkDecorator
473- parametrize = None # type: _ParametrizeMarkDecorator
474- usefixtures = None # type: _UsefixturesMarkDecorator
475- filterwarnings = None # type: _FilterwarningsMarkDecorator
471+ # Using casts instead of type comments intentionally - issue #7473.
472+ # TODO(py36): Change to builtin annotation syntax.
473+ skip = cast (_SkipMarkDecorator , None )
474+ skipif = cast (_SkipifMarkDecorator , None )
475+ xfail = cast (_XfailMarkDecorator , None )
476+ parametrize = cast (_ParametrizeMarkDecorator , None )
477+ usefixtures = cast (_UsefixturesMarkDecorator , None )
478+ filterwarnings = cast (_FilterwarningsMarkDecorator , None )
476479
477480 def __getattr__ (self , name : str ) -> MarkDecorator :
478481 if name [0 ] == "_" :
You can’t perform that action at this time.
0 commit comments