Merge pull request #7840 from asottile/py36_typing_Type

py36+: from typing import Type: no longer need guard
This commit is contained in:
Anthony Sottile
2020-10-03 07:44:06 -07:00
committed by GitHub
22 changed files with 63 additions and 93 deletions

View File

@@ -14,6 +14,7 @@ from typing import Optional
from typing import Sequence
from typing import Set
from typing import Tuple
from typing import Type
from typing import TYPE_CHECKING
from typing import TypeVar
from typing import Union
@@ -31,8 +32,6 @@ from _pytest.outcomes import fail
from _pytest.warning_types import PytestUnknownMarkWarning
if TYPE_CHECKING:
from typing import Type
from ..nodes import Node
@@ -417,9 +416,7 @@ if TYPE_CHECKING:
*conditions: Union[str, bool],
reason: str = ...,
run: bool = ...,
raises: Union[
"Type[BaseException]", Tuple["Type[BaseException]", ...]
] = ...,
raises: Union[Type[BaseException], Tuple[Type[BaseException], ...]] = ...,
strict: bool = ...
) -> MarkDecorator:
...