-
Notifications
You must be signed in to change notification settings - Fork 8
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
Code style validation for Python using YAPF #12
Conversation
I wonder what does |
Indeed, they print their name and version:
Maybe this could even go one step further and use |
Coming back to this. I actually think this is the implementation that is least prone to breaking if the CLI of the validators changes. Thus, IMO, this is ready to go as-is 😉 |
@robertodr I see. Could you please fix latest commit's authorship? It looks like there's my email somehow. |
Weird, it looks like a part of my latest commit is included in your commit. Maybe rebasing helps. |
Rebasing didn't seem to help... |
It did help to get rid of unnecessary changes in diff though. Could you try using |
|
Ugh, seems to be Travis issue. Merging. Thank you! 🎉 |
This PR enables the use of YAPF for Python code style validation. Have a look here for an example.
Some questions:
clang-format
andyapf
:clang-format -lines=start:end
yapf --lines=start-end
I have inserted a check on the
validator
name inresolve_changes
to get the correct argument set up for the actual call to the validator. This is not really clean, @nikolaykasyanov do you have suggestions on how to possibly improve on this?2. I have put a test "Accepts a validator other than clang-format". Is that enough?