-
-
Notifications
You must be signed in to change notification settings - Fork 259
/
pyproject.toml
153 lines (140 loc) · 4.16 KB
/
pyproject.toml
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
[build-system]
requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"
[project]
name = "django-waffle"
dynamic = ["version"]
authors = [{name = "James Socol", email = "[email protected]"}]
license = {text = "BSD"}
description = "A feature flipper for Django."
readme = "README.rst"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Framework :: Django",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.8"
dependencies = ["django>=4.2"]
[project.optional-dependencies]
docs = ["sphinx"]
[project.urls]
Homepage = "http://github.com/django-waffle/django-waffle"
[tool.setuptools]
zip-safe = false
include-package-data = true
[tool.setuptools.dynamic]
version = {attr = "waffle.__version__"}
[tool.setuptools.packages.find]
exclude = ["test_app"] # test_settings
namespaces = false
[tool.setuptools.package-data]
waffle = ["py.typed"]
[tool.mypy]
python_version = "3.8"
exclude = "waffle/tests"
disallow_incomplete_defs = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
strict_equality = true
[[tool.mypy.overrides]]
module = ["django.*"]
ignore_missing_imports = true
[tool.ruff]
line-length = 120
target-version = "py38"
[tool.ruff.lint]
select = [
"AIR", # Airflow
"ASYNC", # flake8-async
"BLE", # flake8-blind-except
"C90", # McCabe cyclomatic complexity
"DJ", # flake8-django
"DTZ", # flake8-datetimez
"E", # pycodestyle errors
"F", # Pyflakes
"FIX", # flake8-fixme
"FLY", # flynt
"G", # flake8-logging-format
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420
"INT", # flake8-gettext
"NPY", # NumPy-specific rules
"PD", # pandas-vet
"PIE", # flake8-pie
"PL", # Pylint
"PYI", # flake8-pyi
"RSE", # flake8-raise
"SLOT", # flake8-slots
"T10", # flake8-debugger
"T20", # flake8-print
"TD", # flake8-todos
"TID", # flake8-tidy-imports
"UP", # pyupgrade
"W", # pycodestyle warnings
"YTT", # flake8-2020
# "A", # flake8-builtins
# "ANN", # flake8-annotations
# "ARG", # flake8-unused-arguments
# "B", # flake8-bugbear
# "C4", # flake8-comprehensions
# "COM", # flake8-commas
# "CPY", # flake8-copyright
# "D", # pydocstyle
# "EM", # flake8-errmsg
# "ERA", # eradicate
# "EXE", # flake8-executable
# "FA", # flake8-future-annotations
# "FBT", # flake8-boolean-trap
# "I", # isort
# "ISC", # flake8-implicit-str-concat
# "N", # pep8-naming
# "PERF", # Perflint
# "PGH", # pygrep-hooks
# "PT", # flake8-pytest-style
# "PTH", # flake8-use-pathlib
# "Q", # flake8-quotes
# "RET", # flake8-return
# "RUF", # Ruff-specific rules
# "S", # flake8-bandit
# "SIM", # flake8-simplify
# "SLF", # flake8-self
# "TCH", # flake8-type-checking
# "TRY", # tryceratops
]
# Files not checked:
# - migrations: most of these are autogenerated and don't need a check
# - docs: contains autogenerated code that doesn't need a check
exclude = [
"*/migrations/*",
"docs",
]
ignore = ["F401"]
[tool.ruff.lint.mccabe]
max-complexity = 23
[tool.ruff.lint.per-file-ignores]
"docs/conf.py" = ["INP001"]
"test_app/models.py" = ["DJ008"] # FIXME
"waffle/models.py" = ["DJ012", "PYI019"] # FIXME
[tool.ruff.lint.pylint]
allow-magic-value-types = ["float", "int", "str"]
max-args = 6 # default is 5
max-branches = 23 # default is 12
max-returns = 13 # default is 6
max-statements = 51 # default is 50