diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | astroid/nodes/node_classes.py | 9 |
2 files changed, 9 insertions, 2 deletions
@@ -18,6 +18,8 @@ Release date: TBA Closes #1260 +* Fix typing and update explanation for ``Arguments.args`` being ``None``. + What's New in astroid 2.9.0? ============================ diff --git a/astroid/nodes/node_classes.py b/astroid/nodes/node_classes.py index 295f7d8c..ef6c52f4 100644 --- a/astroid/nodes/node_classes.py +++ b/astroid/nodes/node_classes.py @@ -858,8 +858,13 @@ class Arguments(mixins.AssignTypeMixin, NodeNG): self.kwarg: Optional[str] = kwarg # can be None """The name of the variable length keyword arguments.""" - self.args: typing.List[AssignName] - """The names of the required arguments.""" + self.args: typing.Optional[typing.List[AssignName]] + """The names of the required arguments. + + Can be None if the assosciated function does not have a retrievable + signature and the arguments are therefore unknown. + This happens with builtin functions implemented in C. + """ self.defaults: typing.List[NodeNG] """The default values for arguments that can be passed positionally.""" |