Repository navigation
Expand file tree
/
Copy pathsetup.cfg
More file actions
70 lines (63 loc) · 2.53 KB
/
Copy pathsetup.cfg
File metadata and controls
70 lines (63 loc) · 2.53 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# flake8 does not read ``pyproject.toml``, so its config lives here.
# We only run wemake-python-styleguide (ruff handles everything else).
# Docs: https://wemake-python-styleguide.readthedocs.io
[flake8]
format = wemake
show-source = true
statistics = false
doctests = true
max-complexity = 6
max-line-length = 88
max-imports = 25
max-arguments = 6
# The default of 5 pushes cohesive ORM glue code into one-use helpers.
max-local-variables = 8
allowed-domain-names = data
select = WPS, E99
ignore =
# Allow logic in `__init__`:
WPS412
# Exceptions are permanent and each says why. The source has no baseline of
# debt: new code must pass without adding anything here.
per-file-ignores =
# Generated code:
*/migrations/*.py: WPS102, WPS114, WPS226, WPS301, WPS432, WPS458
# Test scaffolding and settings are module-level data:
test_project/*.py: WPS110, WPS202, WPS226, WPS407, WPS529
# pytest idioms: short fixture names, many literals and test functions,
# nested config classes, and magic numbers in assertions.
tests/*.py: WPS110, WPS111, WPS118, WPS202, WPS204, WPS210, WPS213, WPS214, WPS218, WPS221, WPS226, WPS338, WPS347, WPS420, WPS431, WPS432, WPS604
# Parameter names (`value`, `obj`, `objs`) are fixed by the Django methods
# these classes override.
eav/admin.py: WPS110
eav/queryset.py: WPS110
eav/widgets.py: WPS110
# `Value`, `value`, `values` and `objects` are the public model API.
eav/models/enum_group.py: WPS110
eav/models/enum_value.py: WPS110
eav/models/value.py: WPS110, WPS226
# Public model API: `objects`, the TYPE_* constants, `slug` overwritten on
# save, and one method per operation on an attribute.
eav/models/attribute.py: WPS110, WPS115, WPS214, WPS601
# `__init__` signatures mirror the Django classes they extend, and
# FIELD_CLASSES is a public mapping that subclasses override.
eav/fields.py: WPS110, WPS475
eav/forms.py: WPS110, WPS115, WPS475
# A decorator factory needs its nested function.
eav/decorators.py: WPS430
# Public re-exports of the models.
eav/models/__init__.py: WPS410
# One function per datatype.
eav/validators.py: WPS202
# The signal handlers are static methods that projects connect and
# disconnect by name, and the helper is the single place that reads and
# writes EAV values.
eav/models/entity.py: WPS214, WPS338, WPS602
# Registration attaches and detaches model internals by name.
eav/registry.py: WPS214, WPS421, WPS602
# A format spec on a call reads fine as an f-string.
eav/logic/slug.py: WPS237
extend-exclude =
.venv
docs
htmlcov