From 7afd696520f70a46334adea6d39f7150379198f3 Mon Sep 17 00:00:00 2001 From: Tushar Sadhwani <86737547+tushar-deepsource@users.noreply.github.com> Date: Wed, 29 Dec 2021 14:06:47 +0530 Subject: [PATCH] Revert "Revert "Remove useless NoReturn in NodeNG.statement's typing (#1304)" (#1307)" (#1319) This reverts commit 7b049a163cc704955a4260992302ff755f6a6789. --- astroid/nodes/node_ng.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/astroid/nodes/node_ng.py b/astroid/nodes/node_ng.py index 3c26f3407a..eb2a5fd8ef 100644 --- a/astroid/nodes/node_ng.py +++ b/astroid/nodes/node_ng.py @@ -32,11 +32,6 @@ 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: @@ -289,7 +284,7 @@ def statement(self, *, future: Literal[True]) -> "nodes.Statement": def statement( self, *, future: Literal[None, True] = None - ) -> Union["nodes.Statement", "nodes.Module", "NoReturn"]: + ) -> Union["nodes.Statement", "nodes.Module"]: """The first parent node, including self, marked as statement node. TODO: Deprecate the future parameter and only raise StatementMissing and return