diff options
author | Marc Mueller <30130371+cdce8p@users.noreply.github.com> | 2021-12-22 10:10:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-22 10:10:43 +0100 |
commit | 7d3b41ceee93f75fbd6bb0da8e803c713319a6ed (patch) | |
tree | 8c423949abbd92d291199015bbe08f8f2fba38c3 | |
parent | e41a896e47d8b5dcd4c460c72bde8063e7c9b447 (diff) | |
download | astroid-git-7d3b41ceee93f75fbd6bb0da8e803c713319a6ed.tar.gz |
Fix node.statement overload typing (#1308)
-rw-r--r-- | astroid/nodes/node_ng.py | 4 | ||||
-rw-r--r-- | astroid/nodes/scoped_nodes/scoped_nodes.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/astroid/nodes/node_ng.py b/astroid/nodes/node_ng.py index dfc84bf1..bb323b10 100644 --- a/astroid/nodes/node_ng.py +++ b/astroid/nodes/node_ng.py @@ -273,9 +273,7 @@ class NodeNG: return any(self is parent for parent in node.node_ancestors()) @overload - def statement( - self, *, future: Literal[None] = ... - ) -> Union["nodes.Statement", "nodes.Module"]: + def statement(self) -> Union["nodes.Statement", "nodes.Module"]: ... @overload diff --git a/astroid/nodes/scoped_nodes/scoped_nodes.py b/astroid/nodes/scoped_nodes/scoped_nodes.py index e467c8ab..70070ce3 100644 --- a/astroid/nodes/scoped_nodes/scoped_nodes.py +++ b/astroid/nodes/scoped_nodes/scoped_nodes.py @@ -658,9 +658,11 @@ class Module(LocalsDictNodeNG): return self.file is not None and self.file.endswith(".py") @overload - def statement(self, *, future: Literal[None] = ...) -> "Module": + def statement(self) -> "Module": ... + # pylint: disable-next=arguments-differ + # https://github.com/PyCQA/pylint/issues/5264 @overload def statement(self, *, future: Literal[True]) -> NoReturn: ... |