aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-11-02 14:25:50 -0700
committerBryan Newbold <bnewbold@robocracy.org>2021-11-02 17:02:49 -0700
commit4d48cde630a8e33b82fdeeaadd4e1855d1b92416 (patch)
tree78f73d62a15072cbb2d474c04917f319663529ad
parenta771edbf089d4d6e4fe4287fc1e68b140abc0c60 (diff)
downloadfatcat-4d48cde630a8e33b82fdeeaadd4e1855d1b92416.tar.gz
fatcat-4d48cde630a8e33b82fdeeaadd4e1855d1b92416.zip
update flake8 configuration
-rw-r--r--python/.flake824
1 files changed, 15 insertions, 9 deletions
diff --git a/python/.flake8 b/python/.flake8
index bb1baa71..f19fb7b1 100644
--- a/python/.flake8
+++ b/python/.flake8
@@ -1,13 +1,19 @@
[flake8]
-# TODO: ANN for better annotation coverage
-select = C,E,F,W
-# The ignores starting with "E251" should be removed after using 'black'
-ignore = F405,F403,W503,E231,E203,E501,E226,E711,E713,E265,ANN101,ANN204,ANN102,E251,E128,E302,E261,E241,E201,E202,E266,E124,E305,E225,W504,E123,E122,E125,E121,E129,E126,E712,W191,E101
-# TODO: should reduce max-complexity
-max-complexity = 50
-exclude = .git,__pycache__,.venv
-max-line-length = 120
+select = C,E,F,W,ANN
+# ANN003 is annotation on, eg, **kwargs
+# ANN101 is annotation on 'self'
+# ANN204 is annotation on '__init__()'
+# E265,E266 are restrictions on comments ('#')
+# E501 is line-too-long, which we enforce with black
+# W503,E203 are allowed by black
+# TODO: additional ignores during prep for black reformatting
+ignore = ANN003,ANN101,ANN204,E265,E266,E501,W503,E203,ANN001,ANN201,E251,E128,E302,E261,E241,E201,E202,E266,E124,E305,E225,W504,E123,E122,E125,E121,E129,E126,E712,W191,E101,F405,E711,E226,E231
+#ignore = ANN003,ANN101,ANN204,E265,E266,E501,W503,E203
per-file-ignores =
*/__init__.py: F401
- tests/*.py: F401,F811
+ tests/*.py: F401,F811,ANN201,ANN001,F403,F405
tests/transform_csl.py: F401,F811,W291
+exclude = .git,__pycache__,.venv
+max-line-length = 96
+# TODO: should reduce max-complexity
+max-complexity = 50