Skip to content

Commit 7d3b41c

Browse files
authored
Fix node.statement overload typing (#1308)
1 parent e41a896 commit 7d3b41c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

astroid/nodes/node_ng.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,7 @@ def parent_of(self, node):
273273
return any(self is parent for parent in node.node_ancestors())
274274

275275
@overload
276-
def statement(
277-
self, *, future: Literal[None] = ...
278-
) -> Union["nodes.Statement", "nodes.Module"]:
276+
def statement(self) -> Union["nodes.Statement", "nodes.Module"]:
279277
...
280278

281279
@overload

astroid/nodes/scoped_nodes/scoped_nodes.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -658,9 +658,11 @@ def fully_defined(self):
658658
return self.file is not None and self.file.endswith(".py")
659659

660660
@overload
661-
def statement(self, *, future: Literal[None] = ...) -> "Module":
661+
def statement(self) -> "Module":
662662
...
663663

664+
# pylint: disable-next=arguments-differ
665+
# https://github.com/PyCQA/pylint/issues/5264
664666
@overload
665667
def statement(self, *, future: Literal[True]) -> NoReturn:
666668
...

0 commit comments

Comments
 (0)