Skip to content

Commit

Permalink
Fix node.statement overload typing - default argument (#1317)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p authored Dec 29, 2021
1 parent a14d088 commit 6e58cdf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion astroid/nodes/node_ng.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,9 @@ def parent_of(self, node):
return any(self is parent for parent in node.node_ancestors())

@overload
def statement(self) -> Union["nodes.Statement", "nodes.Module"]:
def statement(
self, *, future: Literal[None] = ...
) -> Union["nodes.Statement", "nodes.Module"]:
...

@overload
Expand Down
2 changes: 1 addition & 1 deletion astroid/nodes/scoped_nodes/scoped_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ def fully_defined(self):
return self.file is not None and self.file.endswith(".py")

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

# pylint: disable-next=arguments-differ
Expand Down

0 comments on commit 6e58cdf

Please sign in to comment.