Skip to content

Commit

Permalink
Revert "Remove useless NoReturn in NodeNG.statement's typing (pylint-…
Browse files Browse the repository at this point in the history
…dev#1304)" (pylint-dev#1307)

This reverts commit df854be.
  • Loading branch information
cdce8p authored Dec 27, 2021
1 parent 39c37c1 commit 7b049a1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion astroid/nodes/node_ng.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
if TYPE_CHECKING:
from astroid import nodes

if sys.version_info >= (3, 6, 2):
from typing import NoReturn
else:
from typing_extensions import NoReturn

if sys.version_info >= (3, 8):
from typing import Literal
else:
Expand Down Expand Up @@ -282,7 +287,7 @@ def statement(self, *, future: Literal[True]) -> "nodes.Statement":

def statement(
self, *, future: Literal[None, True] = None
) -> Union["nodes.Statement", "nodes.Module"]:
) -> Union["nodes.Statement", "nodes.Module", "NoReturn"]:
"""The first parent node, including self, marked as statement node.
TODO: Deprecate the future parameter and only raise StatementMissing and return
Expand Down

0 comments on commit 7b049a1

Please sign in to comment.