-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
144 lines (126 loc) · 3.14 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
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools",
]
[project]
name = "django-nh3"
version = "0.1.1"
description = "Django integration with for nh3, Python binding to Ammonia HTML sanitizer Rust crate."
readme = "README.rst"
keywords = [
"Django",
]
license = { file = "LICENSE" }
authors = [
{ name = "Mark Walker", email = "[email protected]" },
]
requires-python = ">=3.10"
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Typing :: Typed",
]
dependencies = [
"django>=3.2",
"nh3",
]
urls.Changelog = "https://github.com/marksweb/django-nh3/blob/main/CHANGELOG.rst"
urls.Mastodon = "https://fosstodon.org/@markwalker"
urls.Repository = "https://github.com/marksweb/django-nh3"
urls.Twitter = "https://twitter.com/markwalker_"
[tool.setuptools.packages.find]
where = [
"src",
]
[tool.ruff]
extend-exclude = [
"**migrations/**",
".env",
".ruff_cache",
]
# https://beta.ruff.rs/docs/configuration/
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
"Q", # flake8-quotes
"PLE", # pylint error
"PLR", # pylint refactor
"PLW", # pylint warning
"UP", # pyupgrade
]
ignore = [
"B006", # Do not use mutable data structures for argument defaults
"PLR0913", # Too many arguments to function call,
]
isort.combine-as-imports = true
# Preserve types, even if a file imports `from __future__ import annotations`.
pyupgrade.keep-runtime-typing = true
per-file-ignores."__init__.py" = [
"F401", # unused-import
]
per-file-ignores."src/django_nh3/forms.py" = [
"UP035", # import-replacements - breaks type hint Callable
]
[tool.pytest]
DJANGO_SETTINGS_MODULE = "tests.settings"
django_find_project = false
[tool.pytest.ini_options]
addopts = """\
--strict-config
--strict-markers
--ds=tests.settings
"""
django_find_project = false
[tool.coverage.run]
branch = true
parallel = true
source = [
"django_nh3",
"tests",
]
[tool.coverage.paths]
source = [
"src",
".tox/py*/**/site-packages",
]
[tool.coverage.report]
show_missing = true
[tool.mypy]
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
mypy_path = "src/"
namespace_packages = false
no_implicit_optional = true
show_error_codes = true
warn_unreachable = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
module = "tests.*"
allow_untyped_defs = true
[tool.rstcheck]
ignore_directives = [
"automodule",
]
report_level = "ERROR"