hookspec: change Node -> Union[Item, Collector] to avoid exposing Node

We don't really want `Node` itself as a public API, only its two
subclasses.
This commit is contained in:
Ran Benita 2020-07-10 00:41:43 +03:00
parent 8e8d639276
commit 168d9adefc
1 changed files with 1 additions and 2 deletions

View File

@ -32,7 +32,6 @@ if TYPE_CHECKING:
from _pytest.main import Session
from _pytest.nodes import Collector
from _pytest.nodes import Item
from _pytest.nodes import Node
from _pytest.outcomes import Exit
from _pytest.python import Function
from _pytest.python import Metafunc
@ -827,7 +826,7 @@ def pytest_keyboard_interrupt(
def pytest_exception_interact(
node: "Node",
node: Union["Item", "Collector"],
call: "CallInfo[object]",
report: Union["CollectReport", "TestReport"],
) -> None: