This website requires JavaScript.
Explore
Help
Sign In
android
/
git-repo
Watch
1
Fork
0
You've already forked git-repo
mirror of
https://gerrit.googlesource.com/git-repo
synced
2024-12-21 07:16:21 +00:00
Code
Issues
Packages
Projects
Releases
Wiki
Activity
77479863da
git-repo
/
.flake8
4 lines
61 B
Plaintext
Raw
Normal View
History
Unescape
Escape
Replace pylint with pyflakes/flake8 pylint reports a lot of warnings, but many of them are false positive, and it's difficult to configure it. It also seems that for some reason the included config file is not working well with the latest version. Update the documentation to recommend using pyflakes and flake8 instead of pylint. Remove the pylint config and add a basic flake8 config with minimum settings: - Maximum line length 80 columns - Ignore warnings about indentation (repo uses 2 rather than expected 4) - Ignore warnings about import placement In this commit no code cleanup is done, and it's expected that most of the files will throw up quite a few warnings, at least for flake8. These can be cleaned up in follow-up commits. The existing pylint suppression comments are left as-is. These will be helpful when cleaning up pyflakes warnings later. Change-Id: I2f7cb4340266ed07cc973ca6483b8f09d66a765b
2016-09-02 05:20:38 +00:00
[flake8]
flake8: Increase max line length from 80 to 100 The Google style guide for python [1] says the maximum line length should be 80, but there are several lines in the code base that exceed it: git ls-files | grep py$ | xargs flake8 | grep E501 | wc -l 64 I don't think it's worth going through and re-wrapping all those, so just increase the limit to 100 which seems to be a reasonable compromise: git ls-files | grep py$ | xargs flake8 | grep E501 | wc -l 6 Leave the re-rewrapping of those lines for a follow-up commit, though. [1] http://google.github.io/styleguide/pyguide.html#32-line-length Change-Id: Ia37c34301163431fd1fb4fb6697a4a482d6be077 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254595 Tested-by: David Pursehouse <dpursehouse@collab.net> Reviewed-by: Mike Frysinger <vapier@google.com>
2020-02-12 02:39:27 +00:00
max-line-length=100
flake8: Ignore 'line break before/after binary operator' - W503 line break before binary operator - W504 line break after binary operator There doesn't seem to be a nice way of fixing all of these without replacing W503 with W504 or vice-versa, or unwrapping them resulting in excessively long lines. Let's just suppress them. Change-Id: I7846d0124054f58e1cb480d4459cd9c86b737a50 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254608 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
2020-02-12 07:00:07 +00:00
ignore=E111,E114,E402,W503,W504
Reference in New Issue
Copy Permalink