-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
189 lines (169 loc) · 4.53 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
187
188
189
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]
[project]
authors = [{name = "Josh Thomas", email = "[email protected]"}]
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Wagtail",
"Framework :: Wagtail :: 5",
"Framework :: Wagtail :: 6",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"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 :: Implementation :: CPython"
]
dependencies = ["wagtail>=5.2"]
description = "Add Heroicons to the Wagtail admin."
dynamic = ["version"]
keywords = []
license = {file = "LICENSE"}
name = "wagtail-heroicons"
readme = "README.md"
requires-python = ">=3.8"
[project.optional-dependencies]
dev = [
"beautifulsoup4",
"bumpver",
"coverage[toml]",
"django-stubs",
"environs",
"hatch",
"httpx",
"mypy",
"nodejs-bin",
"nox[uv]",
"pytest",
"pytest-cov",
"pytest-django",
"pytest-randomly",
"pytest-xdist",
"ruff",
"types-beautifulsoup4"
]
lint = ["pre-commit"]
[project.urls]
Documentation = "https://github.com/westerveltco/wagtail-heroicons"
Issues = "https://github.com/westerveltco/wagtail-heroicons/issues"
Source = "https://github.com/westerveltco/wagtail-heroicons"
[tool.bumpver]
commit = true
commit_message = ":bookmark: bump version {old_version} -> {new_version}"
current_version = "0.2.2"
push = false
tag = false
version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]"
[tool.bumpver.file_patterns]
"src/wagtail_heroicons/__init__.py" = ['__version__ = "{version}"']
"tests/test_version.py" = ['assert __version__ == "{version}"']
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if DEBUG:",
"if not DEBUG:",
"if settings.DEBUG:",
"if TYPE_CHECKING:",
'def __str__\(self\)\s?\-?\>?\s?\w*\:'
]
fail_under = 100
[tool.coverage.run]
branch = true
omit = ["tests/*"]
parallel = true
[tool.django-stubs]
django_settings_module = "tests.settings"
strict_settings = false
[tool.hatch.build]
exclude = [".*", "Justfile"]
[tool.hatch.build.targets.wheel]
packages = ["src/wagtail_heroicons"]
[tool.hatch.version]
path = "src/wagtail_heroicons/__init__.py"
[tool.mypy]
check_untyped_defs = true
exclude = "docs/.*\\.py$"
mypy_path = "src/"
no_implicit_optional = true
plugins = ["mypy_django_plugin.main"]
warn_redundant_casts = true
warn_unused_configs = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
ignore_errors = true
ignore_missing_imports = true
module = ["tests.*", "wagtail.*"]
[tool.pytest.ini_options]
addopts = "-n auto --dist loadfile --doctest-modules"
django_find_project = false
norecursedirs = ".* bin build dist *.egg htmlcov logs node_modules templates venv"
python_files = ["tests.py", "test_*.py", "*_tests.py"]
pythonpath = "src"
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.8
target-version = "py38"
[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 = ["wagtail_heroicons"]
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