Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
163 lines (154 loc) · 5.41 KB
/
Copy pathpyproject.toml
File metadata and controls
163 lines (154 loc) · 5.41 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
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
154
155
156
157
158
159
160
161
162
163
[project]
name = "django-memoized-prefetch"
version = "0.1.2"
description = "A memoized prefetch for Django."
authors = [
{name = "Mikuláš Poul", email = "mikulas.poul@xelix.com"},
{name = "Cameron Hobbs", email = "cameron.hobbs@xelix.com"}
]
license = "MIT"
license-files = [
"LICENSE",
]
readme = "README.md"
requires-python = ">=3.9"
dependencies = [
"django (>=4.2)",
"lru-dict>=1.3.0,<2",
]
keywords = ["django"]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Development Status :: 5 - Production/Stable",
"Framework :: Django",
]
[project.urls]
"Repository" = "https://github.com/xelixdev/django-memoized-prefetch"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.ruff]
line-length = 120
target-version = "py310"
[tool.ruff.lint]
select = [
# https://docs.astral.sh/ruff/rules/#pyflakes-f
"F",
# https://docs.astral.sh/ruff/rules/#pycodestyle-e-w
"E",
"W",
# https://docs.astral.sh/ruff/rules/#isort-i
"I",
# https://docs.astral.sh/ruff/rules/#pep8-naming-n
"N",
# https://docs.astral.sh/ruff/rules/#pyupgrade-up
"UP",
# https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
"B",
# https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
"C4",
# https://docs.astral.sh/ruff/rules/#flake8-debugger-t10
"T10",
# https://docs.astral.sh/ruff/rules/#flake8-pie-pie
"PIE",
# https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt
"PT",
# https://docs.astral.sh/ruff/rules/#flake8-return-ret
"RET",
# https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
"SIM",
# https://docs.astral.sh/ruff/rules/#pydocstyle-d
"D201", "D202", "D204", "D206", "D207", "D208", "D209", "D210", "D211", "D213", "D214", "D215", "D300", "D403",
"D419",
# https://docs.astral.sh/ruff/rules/#flake8-implicit-str-concat-isc
"ISC",
# https://docs.astral.sh/ruff/rules/#flake8-import-conventions-icn
"ICN",
# https://docs.astral.sh/ruff/rules/#flake8-tidy-imports-tid
"TID",
# https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
"RUF001", "RUF002", "RUF003", "RUF005", "RUF006", "RUF007", "RUF008", "RUF009", "RUF010", "RUF013", "RUF015",
"RUF016", "RUF017", "RUF018", "RUF019", "RUF020", "RUF021", "RUF022", "RUF023", "RUF024", "RUF026", "RUF028",
"RUF030", "RUF032", "RUF033", "RUF034", "RUF040", "RUF041", "RUF046", "RUF049", "RUF051", "RUF053", "RUF057",
"RUF058", "RUF100", "RUF101", "RUF200",
# https://docs.astral.sh/ruff/rules/#perflint-perf
"PERF",
# https://docs.astral.sh/ruff/rules/#refurb-furb
"FURB",
# https://docs.astral.sh/ruff/rules/#flynt-fly
"FLY",
# https://docs.astral.sh/ruff/rules/#convention-c
"PLC",
# https://docs.astral.sh/ruff/rules/#flake8-builtins-a
"A",
# https://docs.astral.sh/ruff/rules/#flake8-pyi-pyi
"PYI",
# https://docs.astral.sh/ruff/rules/#flake8-type-checking-tc
"TC005", "TC006", "TC007", "TC010",
# https://docs.astral.sh/ruff/rules/os-path-abspath/
"PTH",
# https://docs.astral.sh/ruff/rules/#flake8-logging-format-g
"G",
# https://docs.astral.sh/ruff/rules/#flake8-bandit-s
"S",
# https://docs.astral.sh/ruff/rules/#flake8-django-dj
"DJ",
# https://docs.astral.sh/ruff/rules/#flake8-errmsg-em
"EM",
# https://docs.astral.sh/ruff/rules/#flake8-future-annotations-fa
"FA",
# https://docs.astral.sh/ruff/rules/#flake8-logging-log
"LOG",
# https://docs.astral.sh/ruff/rules/#flake8-quotes-q
"Q",
# https://docs.astral.sh/ruff/rules/#flake8-raise-rse
"RSE",
]
# Never enforce...
ignore = [
"E501", # line length violations
"SIM108", # use-ternary-operator
"E501", # line length violations
"SIM108", # use-ternary-operator
"RET505", # superfluous-else-return
"RET506", # superfluous-else-raise
"RET507", # superfluous-else-continue
"RET508", # superfluous-else-break
"B027", # empty-method-without-abstract-decorator
"A005", # module `name` shaddows Python-standard library
"ISC001", # The following rules may cause conflicts when used with the formatter
"S101", # assert
"S311", # pseudo-random
"S608", # Possible SQL injection vector through string-based query construction
"S308", # mark_safe
"S105", "S106", # Possible hardcoded password assigned to
"S108", # Probable insecure usage of temporary file or directory
"S603", "S607", # subprocess stuff
"DJ006", # Do not use `exclude` with `ModelForm`, use `fields` instead
"DJ007", # Do not use `__all__` with `ModelForm`, use `fields` instead
"DJ008", # Model does not define `__str__` method
"PERF401", # Use a list comprehension to create a transformed list
]
[tool.ruff.lint.per-file-ignores]
# Never inforce F401 (unused-import) in __init__ files
"__init__.py" = ["F401", "F403", "F405"]
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
mark-parentheses = false
parametrize-names-type = "list"
[dependency-groups]
dev = [
"dirty-equals>=0.9.0",
"django-chunkator>=2.0.0",
"django-seal>=1.7.1",
"factory-boy>=3.3.3",
"pytest-cov>=6.2.1",
"pytest-django>=4.11.1",
"ruff>=0.14.4",
]