-
Notifications
You must be signed in to change notification settings - Fork 102
/
pyproject.toml
145 lines (137 loc) · 3.5 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
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=61.2",
]
[project]
name = "django-csp"
version = "4.0b2"
description = "Django Content Security Policy support."
readme = "README.rst"
license = { text = "BSD" }
maintainers = [
{ name = "Mozilla MEAO team", email = "[email protected]" },
]
authors = [
{ name = "James Socol", email = "[email protected]" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Environment :: Web Environment :: Mozilla",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"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",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"django>=4.2",
]
optional-dependencies.dev = [
"django-stubs[compatible-mypy]",
"jinja2>=2.9.6",
"mypy",
"pre-commit",
"pytest",
"pytest-cov",
"pytest-django",
"pytest-ruff",
"sphinx",
"sphinx-rtd-theme",
"tox",
"tox-gh-actions",
"types-setuptools",
]
optional-dependencies.jinja2 = [
"jinja2>=2.9.6",
]
optional-dependencies.tests = [
"jinja2>=2.9.6",
"pytest",
"pytest-cov",
"pytest-django",
"pytest-ruff",
]
optional-dependencies.typing = [
"django-stubs[compatible-mypy]",
"jinja2>=2.9.6",
"mypy",
"pytest",
"pytest-django",
"types-setuptools",
]
urls."Bug Tracker" = "https://github.com/mozilla/django-csp/issues"
urls.Changelog = "https://github.com/mozilla/django-csp/blob/main/CHANGES.md"
urls.Documentation = "http://django-csp.readthedocs.org/"
urls.Homepage = "http://github.com/mozilla/django-csp"
urls."Source Code" = "https://github.com/mozilla/django-csp"
[tool.setuptools]
zip-safe = false
include-package-data = true
[tool.setuptools.packages]
find = { namespaces = false }
[tool.ruff]
target-version = "py38"
line-length = 150
indent-width = 4
extend-exclude = [
"build",
"dist",
"docs",
]
# Set what ruff should check for.
# See https://docs.astral.sh//ruff/rules/ for a list of rules.
lint.select = [
"A", # flake8-builtin errors
"C4", # flake8-comprehensions errors
"DJ", # flake8-django errors
"E", # pycodestyle errors
"F", # pyflakes errors
"I", # import sorting
"Q", # flake8-quotes errors
"T20", # flake8-print errors
"UP", # py-upgrade
"W", # pycodestyle warnings
# "B", # bugbear errors - incompatible with our use of `gettattr` and `setattr`.
]
# Allow unused variables when underscore-prefixed.
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
lint.isort.known-first-party = [
"csp",
]
lint.isort.section-order = [
"future",
"standard-library",
"django",
"third-party",
"first-party",
"local-folder",
]
lint.isort.sections.django = [
"django",
]
[tool.pytest.ini_options]
addopts = "-vs --tb=short --ruff --ruff-format"
DJANGO_SETTINGS_MODULE = "csp.tests.settings"
[tool.mypy]
plugins = [
"mypy_django_plugin.main",
]
exclude = [
'^build/lib',
]
strict = true
[tool.django-stubs]
django_settings_module = "csp.tests.settings"