diff options
| author | Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> | 2023-04-03 22:35:37 +0200 |
|---|---|---|
| committer | Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> | 2023-04-03 22:53:40 +0200 |
| commit | e13e1770e3cb915da270261d185ec235928e2124 (patch) | |
| tree | 14dcc944f34fb3ebde583d288c5921fdcae4577d /astroid/nodes/node_classes.py | |
| parent | f70ad92f3eb235d80e65a5b0492892e7868c096c (diff) | |
| download | astroid-git-e13e1770e3cb915da270261d185ec235928e2124.tar.gz | |
Fix ``lineno`` API on nodes
Diffstat (limited to 'astroid/nodes/node_classes.py')
| -rw-r--r-- | astroid/nodes/node_classes.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/astroid/nodes/node_classes.py b/astroid/nodes/node_classes.py index 93c8d47e..81d7658a 100644 --- a/astroid/nodes/node_classes.py +++ b/astroid/nodes/node_classes.py @@ -699,10 +699,10 @@ class Arguments(_base_nodes.AssignTypeNode): return None @cached_property - def fromlineno(self): + def fromlineno(self) -> int: """The first line that this node appears on in the source code. - :type: int or None + Can also return 0 if the line can not be determined. """ lineno = super().fromlineno return max(lineno, self.parent.fromlineno or 0) |
