summaryrefslogtreecommitdiff
path: root/.flake8
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2022-05-25 14:20:31 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2022-05-25 14:20:31 +0200
commit379598312f60bf414afa8bf549f7f26af9e578ea (patch)
tree358329d1c4c848a99d980d64f2b27b2a7401876b /.flake8
parentc14744db097b1955f2b668dc753b2d2439db0bdf (diff)
downloadpsutil-379598312f60bf414afa8bf549f7f26af9e578ea.tar.gz
introduce flake8-bugbear code checker
Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
Diffstat (limited to '.flake8')
-rw-r--r--.flake810
1 files changed, 6 insertions, 4 deletions
diff --git a/.flake8 b/.flake8
index 1244cd48..20025785 100644
--- a/.flake8
+++ b/.flake8
@@ -1,15 +1,17 @@
# Configuration file for flake 8. This is used by "make lint" and by the
# GIT commit hook script.
-# T001 = print() statement
[flake8]
ignore =
- # line break after binary operator
- W504
+ W504 # line break after binary operator
+ # --- flake8-bugbear
+ B007 # Loop control variable 'keyword' not used within the loop body. If this is intended, start the name with an underscore.
+ B014 # Redundant exception types in `except (IOError, OSError) as err:`. Write `except OSError as err:`, which catches exactly the same exceptions.
+ B008 # Do not perform function calls in argument defaults.
per-file-ignores =
+ # T001 = print() statement
setup.py:T001
scripts/*:T001
- scripts/internal/convert_readme.py:E501,T001
psutil/tests/runner.py:T001
psutil/tests/test_memleaks.py:T001
.github/workflows/*:T001