berkerpeksag / astor

Python AST read/write
https://pypi.org/project/astor/
BSD 3-Clause "New" or "Revised" License
810 stars 102 forks source link

added missing arguments vistor from Armin's original repo #16

Closed whyzgeek closed 9 years ago

whyzgeek commented 9 years ago

Hi

I found a couple of lines missing from original Armin's code. I needed these as it fails my tests without them. Can you please accept this?

Regards Whyzgeek

berkerpeksag commented 9 years ago

Thanks for the patch, @whyzgeek. Could you please convert your test to a test case for astor too? We have very few tests for now, it would be great to add some tests. Also, please add your name to AUTHORS. Thanks again!

whyzgeek commented 9 years ago

All done, the test is there. :)

berkerpeksag commented 9 years ago

Thanks! :) I will apply it shortly.

berkerpeksag commented 9 years ago

Merged in https://github.com/berkerpeksag/astor/commit/0d5faf3ac4eebd83c836e788f31c8e7ba8e4a2d4. Will release 0.4.1 soon. Thanks!

whyzgeek commented 9 years ago

Thanks for this. However, I noticed that you changed the test. There was a reason, I wrote that test specifically like that. If you run the test with or without those couple of lines, it produces similar results. Hence it doesn't really test the functionality. To test this more accurately, you need to pass an arguments node to_source function.

berkerpeksag commented 9 years ago

Yeah, I noticed that after pushed the new release, but I was lazy to test it properly :) Will update the test case. Thanks!

berkerpeksag commented 9 years ago

Hey, added the test in https://github.com/berkerpeksag/astor/commit/ee7a5ff70bb861d220c255dffc7b0d0cf220c231. Thanks again!