diff --git a/astroid/nodes/node_ng.py b/astroid/nodes/node_ng.py index 80f087c42f..5eb6d1985c 100644 --- a/astroid/nodes/node_ng.py +++ b/astroid/nodes/node_ng.py @@ -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 diff --git a/astroid/nodes/scoped_nodes/scoped_nodes.py b/astroid/nodes/scoped_nodes/scoped_nodes.py index 70070ce3d6..c045c99e1d 100644 --- a/astroid/nodes/scoped_nodes/scoped_nodes.py +++ b/astroid/nodes/scoped_nodes/scoped_nodes.py @@ -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