-
Notifications
You must be signed in to change notification settings - Fork 249
Starred tuple assignment #150
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
Starred tuple assignment #150
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really great code, thanks for this! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, that's awesome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woah nice 😮
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible pep8 nit: w/r/t one line between methods of a class.
Try to match the targets with the values so we reduce the number of false positives. Before, all right hand side variables were tainting all of the left hand side variables. a, *b = _, _, TAINT a clean, b tainted a, *b, c = _, _, TAINT, TAINT, _ a clean, b tainted, c clean a, *b, c = _, *_, *TAINT, *_ a clean, b tainted, c tainted
e08b8ab to
80113af
Compare
Fixed. I'll try and fix travis and tox configs later because I think flake8 should've caused the build to fail.
Awesome, thanks again :)
We can do slightly better than just assigning all of the RHS variables to all the LHS targets.
a, b = c, dshould be easy to propagate taint to the correct variable for instance.When we have starargs then we can still try to propagate taint to the variables which could potentially end up tainted.