-
Notifications
You must be signed in to change notification settings - Fork 263
[Python] Add flake8 config #74
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
Conversation
In swiftlang/swift#1153, @practicalswift added a flake8 config to the Swift project, in order to lint the Python scripts used by that project. This does the same for XCTest. This includes all the linting rules active on the main Swift repository. It also includes tweaks to `build_script.py`, which bring this project in full compliance with those linting rules. To lint the Python code in the project: $ flake8 To install flake8: $ pip install flake8 See https://flake8.readthedocs.org/en/latest/ for details.
Neat! Do you think it would make sense to have these checks included in CI. Since the |
This just adds a config file to allow those use of this listing tools for those who may want to, right? Seems reasonable. |
I absolutely do! I wonder if @practicalswift has already put any thought into this. Personally I think it's a great idea, but I'm not sure how I would feel if Python linter errors caused CI to fail... thoughts? 🙌 |
@modocache Perhaps the first step could be to run The
Simply printing the linting errors/warnings would reduce the risk of PEP-8 regressions significantly. What do you think? :-) |
I like it! Would we be able to Either way, you should send a pull request! 🚀 |
@practicalswift You know what would be really cool? @swift-ci Please lint Python The cool part about this would be the fact that that CI step could fail, but contributors would see that it was just the Python linting that failed, not any of the tests or validation tests. |
@modocache That would be really nice! Who is in charge of the CI buildbot? Is it you @shahmishal? :-) |
Yes, I will set this up on CI can you please create a Jira ticket. Thanks! |
In swiftlang/swift#1153, @practicalswift added a flake8 config to the Swift project, in order to lint the Python scripts used by that project. This does the same for XCTest.
This includes all the linting rules active on the main Swift repository. It also includes tweaks to
build_script.py
, which bring this project in full compliance with those linting rules.To lint the Python code in the project:
To install flake8:
See https://flake8.readthedocs.org/en/latest/ for details.