Skip to content

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

@ltcmelo

Description

@ltcmelo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions