diff options
author | Anthony Sottile <asottile@umich.edu> | 2020-10-03 07:44:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-03 07:44:06 -0700 |
commit | 6ed07a1c2547667d1d2529ed8a3e457ef6d8f998 (patch) | |
tree | 28944cfe9e9f3e17a3dc0686319a330a2da6ce03 /src/_pytest/compat.py | |
parent | aa077ab188f9001b42abaa2042ce95d4aa5f04b4 (diff) | |
parent | bfadd4060e83a7c8dc6233643ad9fa4af7368806 (diff) | |
download | pytest-6ed07a1c2547667d1d2529ed8a3e457ef6d8f998.tar.gz |
Merge pull request #7840 from asottile/py36_typing_Type
py36+: from typing import Type: no longer need guard
Diffstat (limited to 'src/_pytest/compat.py')
-rw-r--r-- | src/_pytest/compat.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/_pytest/compat.py b/src/_pytest/compat.py index cbfeb96bc..8fa58bccf 100644 --- a/src/_pytest/compat.py +++ b/src/_pytest/compat.py @@ -24,7 +24,6 @@ from _pytest.outcomes import TEST_OUTCOME if TYPE_CHECKING: from typing import NoReturn - from typing import Type from typing_extensions import Final @@ -349,6 +348,7 @@ else: if sys.version_info >= (3, 8): from functools import cached_property as cached_property else: + from typing import Type class cached_property(Generic[_S, _T]): __slots__ = ("func", "__doc__") @@ -359,13 +359,13 @@ else: @overload def __get__( - self, instance: None, owner: Optional["Type[_S]"] = ... + self, instance: None, owner: Optional[Type[_S]] = ... ) -> "cached_property[_S, _T]": ... @overload # noqa: F811 def __get__( # noqa: F811 - self, instance: _S, owner: Optional["Type[_S]"] = ... + self, instance: _S, owner: Optional[Type[_S]] = ... ) -> _T: ... |