-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
112 lines (101 loc) · 2.69 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
[project]
authors = [{name = "Josh", email = "josh@joshthomas.dev"}]
dependencies = [
"copier>=9.2.0",
"copier-templates-extensions>=0.3.0"
]
description = "A Django project template for The Westervelt Company."
dynamic = ["version"]
license = {file = "LICENSE"}
name = "django-twc-project"
readme = "README.md"
requires-python = ">= 3.9"
[tool.bumpver]
commit = true
commit_message = ":bookmark: bump version {old_version} -> {new_version}"
current_version = "2024.51"
push = false # set to false for CI
tag = false
version_pattern = "YYYY.INC1"
[tool.bumpver.file_patterns]
"VERSION" = ['{version}']
"copier.yml" = ['default: "{version}"']
"tests/test_version.py" = ['assert version == "{version}"']
[tool.djlint]
ignore = "H031" # Don't require `meta` tag keywords
indent = 2
[tool.pytest.ini_options]
addopts = "-n auto --dist loadfile --doctest-modules"
norecursedirs = ".* bin build dist *.egg examples htmlcov logs node_modules src templates venv"
python_files = "tests.py test_*.py *_tests.py"
testpaths = ["tests"]
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".github",
".hg",
".mypy_cache",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"build",
"dist",
"migrations",
"node_modules",
"venv"
]
extend-include = ["*.pyi?"]
indent-width = 4
# Same as Black.
line-length = 88
# Assume Python >3.9
target-version = "py39"
[tool.ruff.format]
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
# Like Black, use double quotes for strings.
quote-style = "double"
[tool.ruff.lint]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["A", "B", "C", "D", "E", "F", "I"]
ignore = ["E501", "E741"] # temporary
select = [
"B", # flake8-bugbear
"E", # Pycodestyle
"F", # Pyflakes
"I", # isort
"UP" # pyupgrade
]
unfixable = []
[tool.ruff.lint.isort]
force-single-line = true
known-first-party = []
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.per-file-ignores]
# Tests can use magic values, assertions, and relative imports
"tests/**/*" = ["PLR2004", "S101", "TID252"]
[tool.ruff.lint.pyupgrade]
# Preserve types, even if a file imports `from __future__ import annotations`.
keep-runtime-typing = true
[tool.uv]
dev-dependencies = [
"bumpver>=2023.1129",
"djlint>=1.34.1",
"pytest>=8.0.0",
"pytest-xdist>=3.5.0",
"pytest-randomly>=3.15.0",
"pytest-reverse>=1.7.0",
"pyyaml>=6.0.1",
"pre-commit>=3.7.0"
]