From 168d9adefc21de98e91e06199a27cac205765c06 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Fri, 10 Jul 2020 00:41:43 +0300 Subject: [PATCH] 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. --- src/_pytest/hookspec.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/_pytest/hookspec.py b/src/_pytest/hookspec.py index 8c88b66cb..cf3da400a 100644 --- a/src/_pytest/hookspec.py +++ b/src/_pytest/hookspec.py @@ -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: