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 4
4
import warnings
5
5
from typing import Any
6
6
from typing import Callable
7
+ from typing import cast
7
8
from typing import Iterable
8
9
from typing import List
9
10
from typing import Mapping
@@ -467,12 +468,14 @@ def test_function():
467
468
468
469
# See TYPE_CHECKING above.
469
470
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 )
476
479
477
480
def __getattr__ (self , name : str ) -> MarkDecorator :
478
481
if name [0 ] == "_" :
You can’t perform that action at this time.
0 commit comments