diff options
author | Anthony Sottile <asottile@umich.edu> | 2020-10-02 13:02:22 -0700 |
---|---|---|
committer | Anthony Sottile <asottile@umich.edu> | 2020-10-02 19:50:10 -0700 |
commit | bfadd4060e83a7c8dc6233643ad9fa4af7368806 (patch) | |
tree | 10b6915916b780d53eacec59193028918cea0598 /src/_pytest/nodes.py | |
parent | a23666d55494f6960dfc8845757c391b5aedec0b (diff) | |
download | pytest-bfadd4060e83a7c8dc6233643ad9fa4af7368806.tar.gz |
py36+: from typing import Type: no longer need guard
Diffstat (limited to 'src/_pytest/nodes.py')
-rw-r--r-- | src/_pytest/nodes.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/_pytest/nodes.py b/src/_pytest/nodes.py index f8dbf8263..c8375e7cd 100644 --- a/src/_pytest/nodes.py +++ b/src/_pytest/nodes.py @@ -10,6 +10,7 @@ from typing import List from typing import Optional 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 @@ -36,8 +37,6 @@ from _pytest.pathlib import Path from _pytest.store import Store if TYPE_CHECKING: - from typing import Type - # Imported here due to circular import. from _pytest.main import Session from _pytest.warning_types import PytestWarning @@ -350,7 +349,7 @@ class Node(metaclass=NodeMeta): """ self.session._setupstate.addfinalizer(fin, self) - def getparent(self, cls: "Type[_NodeType]") -> Optional[_NodeType]: + def getparent(self, cls: Type[_NodeType]) -> Optional[_NodeType]: """Get the next parent node (including self) which is an instance of the given class.""" current = self # type: Optional[Node] |