Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Run pythonstyle under the appropriate interpreter. #6618
left a comment
This PR is pretty big so I'll review tomorrow.
For context, this looks to build off of #6274. I had made a bunch of fixes to allow us to parse both Python 2 and Python 3 ASTs. Didn't realize we weren't actually using it on Py3, though. As I understand, John's PR here allows us to use Py3 and determines which AST to use based off of the interpreter. (John, correct me if wrong - I only quickly glanced).
John, do you mind flagging lines where you made major changes and/or you'd appreciate closer review?
Yesish. The emphasis is a bit odd in a similar fashion to the wording in #5764. The linter simply becomes a standard python tool now independent from pants (with some conditional behavior you introduced in #6274 baked in). We execute the the tool with an interpreter appropriate to the sources we hand it to lint. That interpreter of course has as a part of its own stdlib the right ast.
The change mainly consists of:
The only other interesting bit besides 1 above that I'd like feedback on is the use of