diff --git a/astroid/nodes/node_ng.py b/astroid/nodes/node_ng.py index dfc84bf120..bb323b10f2 100644 --- a/astroid/nodes/node_ng.py +++ b/astroid/nodes/node_ng.py @@ -273,9 +273,7 @@ def parent_of(self, node): 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 e467c8ab91..70070ce3d6 100644 --- a/astroid/nodes/scoped_nodes/scoped_nodes.py +++ b/astroid/nodes/scoped_nodes/scoped_nodes.py @@ -658,9 +658,11 @@ def fully_defined(self): 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: ...