Skip to content

No lineno nor col_offset for *vararg* of nodes.Argument #761

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ltcmelo opened this issue Feb 28, 2020 · 0 comments
Open

No lineno nor col_offset for *vararg* of nodes.Argument #761

ltcmelo opened this issue Feb 28, 2020 · 0 comments
Labels
Bug 🪳 T: Line numbering Issues related to line numbering of nodes

Comments

@ltcmelo
Copy link
Contributor

ltcmelo commented Feb 28, 2020

I can retrieve line number and column offset from individual arguments or a nodes.Argument object, i.e.:

def visit_arguments(self, node : nodes.Arguments):
    for arg in node.args:
        print(arg.lineno)
        print(arg.col_offset)

The snippet above works.

However, I can't seem to find the same information about the vararg, given that node.vararg is a plain string. Neither can I obtain the line number/column_offset of the nodes.Argument as a whole; I get None for both node.lineno and node.col_offset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🪳 T: Line numbering Issues related to line numbering of nodes
Projects
None yet
Development

No branches or pull requests

3 participants