Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Exception in variadic arguments #199

@chess-equality

Description

@chess-equality

I have the following functions:

def function6(a, *param):
    print "variadicArgs"
def function7(a, *args, **kwargs):
    print "variadicAndKeywordArgs"

Parsing these with the BblfshClient results in the following exception:

Vector(driver failure: Traceback (most recent call last):
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/requestprocessor.py", line 155, in process_request
    ast = AstImprover(code, orig_ast).parse()
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/astimprove.py", line 39, in parse
    res = self.visit(self._astdict, root=True)
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/astimprove.py", line 66, in visit
    visit_result = meth(node)
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/astimprove.py", line 264, in visit_other
    node[field] = meth(child)
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/astimprove.py", line 271, in visit_other_field
    return [self.visit(x) for x in node]
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/astimprove.py", line 271, in <listcomp>
    return [self.visit(x) for x in node]
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/astimprove.py", line 66, in visit
    visit_result = meth(node)
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/astimprove.py", line 264, in visit_other
    node[field] = meth(child)
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/astimprove.py", line 269, in visit_other_field
    return self.visit(node)
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/astimprove.py", line 66, in visit
    visit_result = meth(node)
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/astimprove.py", line 242, in visit_arguments
    vararg["ast_type"] = "vararg"
TypeError: 'str' object does not support item assignment
)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions