diff --git a/stubs/docutils/docutils/nodes.pyi b/stubs/docutils/docutils/nodes.pyi index 9453b537e163..82a5fba393a1 100644 --- a/stubs/docutils/docutils/nodes.pyi +++ b/stubs/docutils/docutils/nodes.pyi @@ -89,7 +89,7 @@ class Node: @overload def next_node( self, condition: type[_N], include_self: bool = False, descend: bool = True, siblings: bool = False, ascend: bool = False - ) -> _N: ... + ) -> _N | None: ... @overload def next_node( self, @@ -98,7 +98,7 @@ class Node: descend: bool = True, siblings: bool = False, ascend: bool = False, - ) -> Node: ... + ) -> Node | None: ... def validate(self, recursive: bool = True) -> None: ... def validate_position(self) -> None: ...