|
4 | 4 | import warnings
|
5 | 5 | from typing import Any
|
6 | 6 | from typing import Callable
|
7 |
| -from typing import cast |
8 | 7 | from typing import Iterable
|
9 | 8 | from typing import List
|
10 | 9 | from typing import Mapping
|
@@ -473,14 +472,13 @@ def test_function():
|
473 | 472 |
|
474 | 473 | # See TYPE_CHECKING above.
|
475 | 474 | if TYPE_CHECKING:
|
476 |
| - # Using casts instead of type comments intentionally - issue #7473. |
477 | 475 | # TODO(py36): Change to builtin annotation syntax.
|
478 |
| - skip = cast(_SkipMarkDecorator, None) |
479 |
| - skipif = cast(_SkipifMarkDecorator, None) |
480 |
| - xfail = cast(_XfailMarkDecorator, None) |
481 |
| - parametrize = cast(_ParametrizeMarkDecorator, None) |
482 |
| - usefixtures = cast(_UsefixturesMarkDecorator, None) |
483 |
| - filterwarnings = cast(_FilterwarningsMarkDecorator, None) |
| 476 | + skip = _SkipMarkDecorator(Mark("skip", (), {})) |
| 477 | + skipif = _SkipifMarkDecorator(Mark("skipif", (), {})) |
| 478 | + xfail = _XfailMarkDecorator(Mark("xfail", (), {})) |
| 479 | + parametrize = _ParametrizeMarkDecorator(Mark("parametrize", (), {})) |
| 480 | + usefixtures = _UsefixturesMarkDecorator(Mark("usefixtures", (), {})) |
| 481 | + filterwarnings = _FilterwarningsMarkDecorator(Mark("filterwarnings", (), {})) |
484 | 482 |
|
485 | 483 | def __getattr__(self, name: str) -> MarkDecorator:
|
486 | 484 | if name[0] == "_":
|
|
0 commit comments