Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Merge "Replace pylint with pyflakes/flake8"
Browse files Browse the repository at this point in the history
  • Loading branch information
dpursehouse authored and Gerrit Code Review committed Sep 20, 2016
2 parents 01b7d75 + bb5b1a0 commit 4aed6f8
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 302 deletions.
3 changes: 3 additions & 0 deletions .flake8
@@ -0,0 +1,3 @@
[flake8]
max-line-length=80
ignore=E111,E114,E402
298 changes: 0 additions & 298 deletions .pylintrc

This file was deleted.

28 changes: 24 additions & 4 deletions SUBMITTING_PATCHES.md
Expand Up @@ -2,7 +2,7 @@

- Make small logical changes.
- Provide a meaningful commit message.
- Check for coding errors with pylint
- Check for coding errors and style nits with pyflakes and flake8
- Make sure all code is under the Apache License, 2.0.
- Publish your changes for review.
- Make corrections if requested.
Expand Down Expand Up @@ -36,12 +36,32 @@ If your description starts to get too long, that's a sign that you
probably need to split up your commit to finer grained pieces.


## Check for coding errors with pylint
## Check for coding errors and style nits with pyflakes and flake8

Run pylint on changed modules using the provided configuration:
### Coding errors

pylint --rcfile=.pylintrc file.py
Run `pyflakes` on changed modules:

pyflakes file.py

Ideally there should be no new errors or warnings introduced.

### Style violations

Run `flake8` on changes modules:

flake8 file.py

Note that repo generally follows [Google's python style guide]
(https://google.github.io/styleguide/pyguide.html) rather than [PEP 8]
(https://www.python.org/dev/peps/pep-0008/), so it's possible that
the output of `flake8` will be quite noisy. It's not mandatory to
avoid all warnings, but at least the maximum line length should be
followed.

If there are many occurrences of the same warning that cannot be
avoided without going against the Google style guide, these may be
suppressed in the included `.flake8` file.

## Check the license

Expand Down

0 comments on commit 4aed6f8

Please sign in to comment.