Skip to content

Commit 6e58cdf

Browse files
authored
Fix node.statement overload typing - default argument (#1317)
1 parent a14d088 commit 6e58cdf

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

astroid/nodes/node_ng.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,9 @@ def parent_of(self, node):
278278
return any(self is parent for parent in node.node_ancestors())
279279

280280
@overload
281-
def statement(self) -> Union["nodes.Statement", "nodes.Module"]:
281+
def statement(
282+
self, *, future: Literal[None] = ...
283+
) -> Union["nodes.Statement", "nodes.Module"]:
282284
...
283285

284286
@overload

astroid/nodes/scoped_nodes/scoped_nodes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ def fully_defined(self):
658658
return self.file is not None and self.file.endswith(".py")
659659

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

664664
# pylint: disable-next=arguments-differ

0 commit comments

Comments
 (0)