-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
186 lines (166 loc) · 3.29 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
[project]
name = "tin"
description = "An autograder for Computer Science Classes"
readme = "README.md"
authors = [
{name = "The TJHSST Computer Systems Lab", email = "[email protected]"},
]
requires-python = ">=3.8"
version = "1.0"
dynamic = ["dependencies"]
license = { file = "LICENSE" }
[project.urls]
Repository = "https://github.com/tjcsl/tin"
[tool.setuptools]
packages = ["tin"]
[tool.setuptools.dynamic]
dependencies = { file = "requirements.txt" }
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "tin.settings"
python_files = "tests.py test_*.py"
norecursedirs = ["media", "migrations", "sandboxing"]
testpaths = "tin"
addopts = "--doctest-modules tin --import-mode=importlib -n 8"
doctest_optionflags = "NORMALIZE_WHITESPACE NUMBER"
[tool.coverage.run]
branch = true
source = ["tin"]
omit = [
"*/migrations/*",
"*/apps.py",
"*/urls.py",
"*/wsgi.py",
"*/tests.py",
"*/test_*.py",
]
relative_files = true
[tool.coverage.report]
exclude_also = [
# Don't complain about missing debug-only code:
"def __repr__",
# Don't complain about abstract methods, they aren't run:
"@(abc\\.)?abstractmethod",
# Don't complain about code that won't run
"if __name__ == .__main__.:",
# Ignore type-checking only code
"if (typing\\.)?TYPE_CHECKING:",
]
[tool.black]
line-length = 100
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| media
| migrations
| secret.*
)/
'''
[tool.ruff]
extend-exclude = [
".github",
".env",
"env",
"secret",
"media",
"migrations",
]
show-fixes = false
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = [
# flake8-bugbear
"B",
# flake8-blind-except
"BLE",
# flake8-comprehensions
"C4",
# pydocstyle
"D",
# flake8-django
"DJ",
# pycodestyle
"E",
# Pyflakes
"F",
# flake8-boolean-trap
"FBT",
# isort
"I",
# flake8-no-pep420
"INP",
# pep8-naming
"N",
# Pylint
"PL",
# Pytest
"PT",
# pygrep hooks
"PGH",
# ruff
"RUF",
# pyupgrade
"UP",
]
ignore = [
# null=True on charfields
"DJ001",
# branching
"PLR09",
# magic number comparison
"PLR2004",
# fixtures not returning anything should have leading underscore
"PT004",
# mutable class attrs annotated as typing.ClassVar
"RUF012",
# missing docstring
"D1",
# periods at the end of docstrings
"D415",
# as recommended by https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"E111",
"E114",
"E117",
"E501",
"D206",
"D300",
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.isort]
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
mark-parentheses = false
parametrize-names-type = "tuple"
parametrize-values-type = "tuple"
[tool.ruff.lint.pep8-naming]
extend-ignore-names = [
"User",
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = [
"F401",
"F403",
]
"*test*" = [
"FBT",
]
[tool.ruff.format]
docstring-code-format = true
line-ending = "lf"
[tool.codespell]
write-changes = true
# this has to be a string of the form a,b,c
# ignore-words-list = ""
# ignore comments like: # codespell: ignore
ignore-regex=".+# *codespell: *ignore.*"