summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lord <davidism@gmail.com>2023-01-20 11:07:11 -0800
committerDavid Lord <davidism@gmail.com>2023-01-20 11:07:11 -0800
commit50a5fd4fb27bae88c4f72a7bc2fd14a8d65332dc (patch)
tree51ee761602da48a541db62547b815ccf21d2f476
parent102ba5d6889be27eb14a44c474e0d7bb210e661c (diff)
downloadjinja2-50a5fd4fb27bae88c4f72a7bc2fd14a8d65332dc.tar.gz
move and update flake8 config
-rw-r--r--.flake828
-rw-r--r--setup.cfg25
2 files changed, 28 insertions, 25 deletions
diff --git a/.flake8 b/.flake8
new file mode 100644
index 0000000..705245b
--- /dev/null
+++ b/.flake8
@@ -0,0 +1,28 @@
+[flake8]
+extend-select =
+ # bugbear
+ B
+ # bugbear opinions
+ B9
+ # implicit str concat
+ ISC
+extend-ignore =
+ # slice notation whitespace, invalid
+ E203
+ # line length, handled by bugbear B950
+ E501
+ # bare except, handled by bugbear B001
+ E722
+ # zip with strict=, requires python >= 3.10
+ B905
+ # string formatting opinion, B028 renamed to B907
+ B028
+ B907
+# up to 88 allowed by bugbear B950
+max-line-length = 80
+per-file-ignores =
+ # __init__ exports names
+ src/jinja2/__init__.py: F401
+ # not relevant to jinja's compiler
+ src/jinja2/compiler.py: B906
+ src/jinja2/idtracking.py: B906
diff --git a/setup.cfg b/setup.cfg
index edfa309..96ce202 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -61,31 +61,6 @@ source =
src
*/site-packages
-[flake8]
-# B = bugbear
-# E = pycodestyle errors
-# F = flake8 pyflakes
-# W = pycodestyle warnings
-# B9 = bugbear opinions
-# ISC = implicit str concat
-select = B, E, F, W, B9, ISC
-ignore =
- # slice notation whitespace, invalid
- E203
- # line length, handled by bugbear B950
- E501
- # bare except, handled by bugbear B001
- E722
- # bin op line break, invalid
- W503
- # zip with strict=, requires python >= 3.10
- B905
-# up to 88 allowed by bugbear B950
-max-line-length = 80
-per-file-ignores =
- # __init__ exports names
- src/jinja2/__init__.py: F401
-
[mypy]
files = src/jinja2
python_version = 3.7