-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.flake8
More file actions
38 lines (38 loc) · 1.86 KB
/
Copy path.flake8
File metadata and controls
38 lines (38 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
[flake8]
max-line-length = 140
# Ignore rationale:
# E203: whitespace before ':' - conflicts with black's slice formatting
# W503: line break before binary operator - conflicts with black
# E501: line too long - relying on black's --line-length=88 for this
# E402: module-level imports not at top - FastAPI lifespan imports
# B008: function-calls in default args - standard FastAPI Depends/Query
# E731: lambda assignment - stylistic; allowed in tests + small utils
# B042: exception __init__ should pass kwargs to super - stylistic
# pickle-compat warning; ~200 instances across the codebase
# predate the rule. Revisit when bulk-refactoring exceptions.
# B007: loop variable not used - intentional in many ``for _, x in ...``
# patterns; rule has high false-positive rate here.
# C401/C408/C416/C420: ``set()``/``dict()``/comprehension micro-style
# preferences - black handles formatting; rewriting these
# provides no functional benefit.
# B014: redundant exception types - cleaned up case-by-case; the
# remaining instances are intentional (clarity over brevity).
# B011: ``assert False`` - used in tests as ``assert False, "should have raised"``;
# optimized-Python (-O) removal is not a concern for our test harness.
# B043: ``delattr(obj, "constant")`` - stylistic preference for ``del obj.attr``;
# neither is safer than the other.
extend-ignore = E203, W503, E501, E402, B008, E731, B042, B007, C401, C408, C416, C420, B014, B011, B043
exclude =
.git,
__pycache__,
.venv,
venv,
build,
dist,
*.egg-info
per-file-ignores =
# tests/: F401/F841 already documented; add B017 (broad
# pytest.raises(Exception)) and B023 (closure captures loop var)
# - both are common test patterns this codebase uses for
# intentional broad-exception sweeps and parametrize-loop helpers.
tests/*:F401,F841,B017,B023