aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-10-26 18:10:45 -0700
committerBryan Newbold <bnewbold@archive.org>2021-10-26 18:10:45 -0700
commit7087e7f65d8b81e29af44a43c1067bb2ec618c4e (patch)
tree0b5e1e0b026f55c689049337846a58047c1fadea /python
parentb756470f21ba6076cca020ecf5374fc0ec5c2c14 (diff)
downloadsandcrawler-7087e7f65d8b81e29af44a43c1067bb2ec618c4e.tar.gz
sandcrawler-7087e7f65d8b81e29af44a43c1067bb2ec618c4e.zip
commit updated flake8 lint configuration
Diffstat (limited to 'python')
-rw-r--r--python/.flake816
1 files changed, 10 insertions, 6 deletions
diff --git a/python/.flake8 b/python/.flake8
index d270f3a..4dd17b7 100644
--- a/python/.flake8
+++ b/python/.flake8
@@ -1,15 +1,19 @@
[flake8]
select = C,E,F,W,ANN
+# ANN003 is annotation on, eg, **kwargs
+# ANN101 is annotation on 'self' (why would that be wanted?)
+# ANN204 is annotation on '__init__()'
+# E265,E266 are restrictions on comments ('#')
+# E501 is line-too-long, which we enforce with yapf
# TODO: C901 is complexity, should be re-enabled at some point
-# TODO: ANN201,ANN001,ANN202,ANN206,ANN205 are core annotations, should be enabled
-# TODO: E251,W504,E126,E125 are unfortunate yapf behaviors; could try to work around them?
-# ANN003 is just type annotation on, eg, **kwargs
-# E266 disallows multiple #, eg in section dividers
-ignore = E266,F405,F403,W503,E231,E203,E501,E226,E711,E713,E265,ANN101,ANN204,ANN102,C901,ANN201,ANN001,ANN202,ANN206,ANN003,ANN205,E251,W504,E126,E125
+# TODO: E251,W504,E126,E125,W503 are unfortunate yapf behaviors; could try to work around them?
+ignore = ANN003,ANN101,ANN204,E265,E266,E501,C901,E251,W504,E126,E125,W503
per-file-ignores =
sandcrawler/__init__.py: F401
- tests/*.py: ANN201,ANN001
sandcrawler/ia.py: E402
+ tests/*.py: ANN201,ANN001,F403,F405
+ *_tool.py,sandcrawler_worker.py: ANN201,ANN001,ANN202,ANN206,ANN205,F403,F405
+ scripts: ANN201,ANN001,ANN202,ANN206,ANN205
exclude = .git,__pycache__,.venv,scripts/
max-line-length = 96
max-complexity = 30