google / pasta

Library to refactor python code through AST manipulation.
Apache License 2.0
341 stars 40 forks source link

Mostly rewrite the open_scope and close_scope functions #29

Closed soupytwist closed 6 years ago

soupytwist commented 6 years ago

These still could use some work, but they are (hopefully) more clear now what is going on. Previously, the location and index internal to the token generator was not being updated quite correctly. In debugging it I cleaned up the logic a bit + added a test to demonstrate that this case works now.