Merge pull request #7476 from bluetech/pylint-callable

mark/structure: fix pylint complaining that builtin marks are not callable
This commit is contained in:
Bruno Oliveira 2020-07-10 17:26:37 -03:00 committed by GitHub
commit 0b58f73d44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 6 deletions

View File

@ -4,6 +4,7 @@ import typing
import warnings import warnings
from typing import Any from typing import Any
from typing import Callable from typing import Callable
from typing import cast
from typing import Iterable from typing import Iterable
from typing import List from typing import List
from typing import Mapping from typing import Mapping
@ -467,12 +468,14 @@ class MarkGenerator:
# See TYPE_CHECKING above. # See TYPE_CHECKING above.
if TYPE_CHECKING: if TYPE_CHECKING:
skip = None # type: _SkipMarkDecorator # Using casts instead of type comments intentionally - issue #7473.
skipif = None # type: _SkipifMarkDecorator # TODO(py36): Change to builtin annotation syntax.
xfail = None # type: _XfailMarkDecorator skip = cast(_SkipMarkDecorator, None)
parametrize = None # type: _ParametrizeMarkDecorator skipif = cast(_SkipifMarkDecorator, None)
usefixtures = None # type: _UsefixturesMarkDecorator xfail = cast(_XfailMarkDecorator, None)
filterwarnings = None # type: _FilterwarningsMarkDecorator parametrize = cast(_ParametrizeMarkDecorator, None)
usefixtures = cast(_UsefixturesMarkDecorator, None)
filterwarnings = cast(_FilterwarningsMarkDecorator, None)
def __getattr__(self, name: str) -> MarkDecorator: def __getattr__(self, name: str) -> MarkDecorator:
if name[0] == "_": if name[0] == "_":