Skip to content

Commit ac8aaae

Browse files
author
Rob Hudson
committed
Update pre-commit, add pyproject-fmt, run on all files
1 parent 4899179 commit ac8aaae

File tree

7 files changed

+55
-49
lines changed

7 files changed

+55
-49
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,20 @@
1212
repos:
1313
# Note: hooks that add content must run before ones which check formatting, lint, etc
1414
- repo: https://github.com/pre-commit/pre-commit-hooks
15-
rev: v4.5.0 # Use the ref you want to point at
15+
rev: v4.6.0
1616
hooks:
1717
- id: check-yaml
1818
- id: end-of-file-fixer
1919
- id: trailing-whitespace
20-
- repo: https://github.com/charliermarsh/ruff-pre-commit
21-
rev: v0.1.14
20+
- repo: https://github.com/astral-sh/ruff-pre-commit
21+
rev: v0.4.1
2222
hooks:
2323
# Run the linter
2424
- id: ruff
2525
args: [--fix, --exit-non-zero-on-fix]
2626
# Run the formatter
2727
- id: ruff-format
28+
- repo: https://github.com/tox-dev/pyproject-fmt
29+
rev: 1.8.0
30+
hooks:
31+
- id: pyproject-fmt

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ python:
2222
install:
2323
- method: pip
2424
path: .
25-
- requirements: docs/requirements.txt
25+
- requirements: docs/requirements.txt

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Django-CSP
1010

1111
Django-CSP adds Content-Security-Policy_ headers to Django.
1212

13-
The code lives on GitHub_, where you can report Issues_.
13+
The code lives on GitHub_, where you can report Issues_.
1414

1515
The full documentation is available on ReadTheDocs_.
1616

docs/conf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,7 @@
217217

218218
# One entry per manual page. List of tuples
219219
# (source start file, name, description, authors, manual section).
220-
man_pages = [
221-
("index", "django-csp", "Django-CSP Documentation", ["James Socol, Mozilla"], 1)
222-
]
220+
man_pages = [("index", "django-csp", "Django-CSP Documentation", ["James Socol, Mozilla"], 1)]
223221

224222
# If true, show URL addresses after external links.
225223
# man_show_urls = False

docs/configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,4 +220,4 @@ These settings control the behavior of django-csp. Defaults are in
220220
.. _block-all-mixed-content: https://w3c.github.io/webappsec-mixed-content/
221221
.. _block-all-mixed-content_mdn: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/block-all-mixed-content
222222
.. _plugin_types_mdn: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/plugin-types
223-
.. _prefetch_src_mdn: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/prefetch-src
223+
.. _prefetch_src_mdn: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/prefetch-src

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sphinx_rtd_theme
1+
sphinx_rtd_theme

pyproject.toml

Lines changed: 43 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,59 @@
11
[build-system]
2-
requires = ["setuptools>=61.2"]
32
build-backend = "setuptools.build_meta"
3+
requires = [
4+
"setuptools>=61.2",
5+
]
46

57
[project]
6-
name = "django_csp"
8+
name = "django-csp"
79
version = "3.8"
810
description = "Django Content Security Policy support."
911
readme = "README.rst"
10-
authors = [{name = "James Socol", email = "[email protected]"}]
11-
maintainers = [{name = "Mozilla MEAO team", email = "[email protected]"}]
1212
license = {text = "BSD"}
13+
maintainers = [{name = "Mozilla MEAO team", email = "[email protected]"}]
14+
authors = [{name = "James Socol", email = "[email protected]"}]
1315
classifiers = [
14-
"Development Status :: 5 - Production/Stable",
15-
"Environment :: Web Environment",
16-
"Environment :: Web Environment :: Mozilla",
17-
"Programming Language :: Python",
18-
"License :: OSI Approved :: BSD License",
19-
"Operating System :: OS Independent",
20-
"Intended Audience :: Developers",
21-
"Topic :: Software Development :: Libraries :: Python Modules",
22-
"Programming Language :: Python",
23-
"Programming Language :: Python :: 3",
24-
"Programming Language :: Python :: 3.8",
25-
"Programming Language :: Python :: 3.9",
26-
"Programming Language :: Python :: 3.10",
27-
"Programming Language :: Python :: 3.11",
28-
"Programming Language :: Python :: 3.12",
29-
"Programming Language :: Python :: Implementation :: PyPy",
30-
"Programming Language :: Python :: Implementation :: CPython",
31-
"Framework :: Django :: 3.2",
32-
"Framework :: Django :: 4.2",
33-
"Framework :: Django :: 5.0",
16+
"Development Status :: 5 - Production/Stable",
17+
"Environment :: Web Environment",
18+
"Environment :: Web Environment :: Mozilla",
19+
"Framework :: Django :: 3.2",
20+
"Framework :: Django :: 4.2",
21+
"Framework :: Django :: 5.0",
22+
"Intended Audience :: Developers",
23+
"License :: OSI Approved :: BSD License",
24+
"Operating System :: OS Independent",
25+
"Programming Language :: Python",
26+
"Programming Language :: Python",
27+
"Programming Language :: Python :: 3",
28+
"Programming Language :: Python :: 3.8",
29+
"Programming Language :: Python :: 3.9",
30+
"Programming Language :: Python :: 3.10",
31+
"Programming Language :: Python :: 3.11",
32+
"Programming Language :: Python :: 3.12",
33+
"Programming Language :: Python :: Implementation :: CPython",
34+
"Programming Language :: Python :: Implementation :: PyPy",
35+
"Topic :: Software Development :: Libraries :: Python Modules",
36+
]
37+
dependencies = [
38+
"Django>=3.2",
3439
]
35-
dependencies = ["Django>=3.2"]
36-
37-
[project.urls]
38-
Homepage = "http://github.com/mozilla/django-csp"
39-
Documentation = "http://django-csp.readthedocs.org/"
40-
Changelog = "https://github.com/mozilla/django-csp/blob/main/CHANGES"
41-
"Bug Tracker" = "https://github.com/mozilla/django-csp/issues"
42-
"Source Code" = "https://github.com/mozilla/django-csp"
43-
4440
[project.optional-dependencies]
41+
jinja2 = [
42+
"jinja2>=2.9.6",
43+
]
4544
tests = [
46-
"pytest",
47-
"pytest-cov",
48-
"pytest-django",
49-
"pytest-ruff",
50-
"jinja2>=2.9.6",
45+
"jinja2>=2.9.6",
46+
"pytest",
47+
"pytest-cov",
48+
"pytest-django",
49+
"pytest-ruff",
5150
]
52-
jinja2 = ["jinja2>=2.9.6"]
51+
[project.urls]
52+
"Bug Tracker" = "https://github.com/mozilla/django-csp/issues"
53+
Changelog = "https://github.com/mozilla/django-csp/blob/main/CHANGES"
54+
Documentation = "http://django-csp.readthedocs.org/"
55+
Homepage = "http://github.com/mozilla/django-csp"
56+
"Source Code" = "https://github.com/mozilla/django-csp"
5357

5458
[tool.setuptools]
5559
zip-safe = false

0 commit comments

Comments
 (0)