Skip to content

Commit 8f4fbe7

Browse files
committed
mark/structure: fix pylint complaining that builtin marks are not callable
1 parent 2ae721c commit 8f4fbe7

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/_pytest/mark/structures.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import warnings
55
from typing import Any
66
from typing import Callable
7+
from typing import cast
78
from typing import Iterable
89
from typing import List
910
from typing import Mapping
@@ -467,12 +468,12 @@ 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+
skip = cast(_SkipMarkDecorator, None)
472+
skipif = cast(_SkipifMarkDecorator, None)
473+
xfail = cast(_XfailMarkDecorator, None)
474+
parametrize = cast(_ParametrizeMarkDecorator, None)
475+
usefixtures = cast(_UsefixturesMarkDecorator, None)
476+
filterwarnings = cast(_FilterwarningsMarkDecorator, None)
476477

477478
def __getattr__(self, name: str) -> MarkDecorator:
478479
if name[0] == "_":

0 commit comments

Comments
 (0)