Skip to content
This repository has been archived by the owner on May 31, 2020. It is now read-only.

Resolve target for augassign, fix decorator to take args and kwargs #544

Merged
merged 1 commit into from
May 23, 2017

Conversation

luizirber
Copy link
Contributor

Fixes #534

visit_AugAssign was considering only the case where the target is a Name, but it can also take Attribute or Subscript: http://greentreesnakes.readthedocs.io/en/latest/nodes.html#AugAssign

This PR fixes the issue by checking the type of the target first and using the appropriate visitor first.
It also fixes the @node_visitor decorator to allow extra arguments and keyword arguments to be passed.

(thanks @eliasdorneles !)

Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@eliasdorneles eliasdorneles merged commit f10c8ce into beeware:master May 23, 2017
@luizirber luizirber deleted the fix/534 branch June 5, 2017 20:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Attribute error when using += operator on an instance attribute
3 participants