Skip to content

Commit dbf9ec2

Browse files
committed
pre-commit: Add pyproject-fmt and validate pyproject.toml
1 parent c4a2135 commit dbf9ec2

File tree

2 files changed

+78
-74
lines changed

2 files changed

+78
-74
lines changed

.pre-commit-config.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
repos:
22
- repo: https://github.com/adamchainz/django-upgrade
3-
rev: 1.28.0
3+
rev: 1.29.0
44
hooks:
55
- id: django-upgrade
66
args: [--target-version, "5.2"]
77

88
- repo: https://github.com/astral-sh/ruff-pre-commit
9-
rev: v0.13.1
9+
rev: v0.14.0
1010
hooks:
1111
- id: ruff-check
1212
- id: ruff-format
@@ -17,3 +17,13 @@ repos:
1717
- id: codespell # See pyproject.toml for args
1818
additional_dependencies:
1919
- tomli
20+
21+
- repo: https://github.com/tox-dev/pyproject-fmt
22+
rev: v2.11.0
23+
hooks:
24+
- id: pyproject-fmt
25+
26+
- repo: https://github.com/abravalheri/validate-pyproject
27+
rev: v0.24.1
28+
hooks:
29+
- id: validate-pyproject

pyproject.toml

Lines changed: 66 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,104 @@
11
[build-system]
2-
requires = ["hatchling"]
32
build-backend = "hatchling.build"
3+
requires = [ "hatchling" ]
44

55
[project]
66
name = "django-valkey"
77
version = "0.3.1"
88
description = "a valkey backend for django"
99
readme = "README.rst"
10-
requires-python = ">=3.10"
1110
license = "BSD-3-Clause"
1211
maintainers = [
13-
{name = "amirreza",email = "[email protected]"},
12+
{ name = "amirreza", email = "[email protected]" },
1413
]
14+
requires-python = ">=3.10"
1515
classifiers = [
16-
"Programming Language :: Python",
17-
"Environment :: Web Environment",
18-
"Development Status :: 4 - Beta" ,
19-
"Topic :: Utilities",
20-
"Intended Audience :: Developers",
21-
"License :: OSI Approved :: BSD License",
22-
"Operating System :: OS Independent",
23-
"Topic :: Software Development :: Libraries",
24-
"Programming Language :: Python :: 3",
25-
"Programming Language :: Python :: 3 :: Only",
26-
"Programming Language :: Python :: 3.10",
27-
"Programming Language :: Python :: 3.11",
28-
"Programming Language :: Python :: 3.12",
29-
"Programming Language :: Python :: 3.13",
30-
"Framework :: Django :: 5.0",
31-
"Framework :: Django :: 5.1",
32-
"Framework :: Django :: 5.2",
33-
"Framework :: Django :: 6",
34-
"Framework :: Django :: 6.0"
16+
"Development Status :: 4 - Beta",
17+
"Environment :: Web Environment",
18+
"Framework :: Django :: 5.0",
19+
"Framework :: Django :: 5.1",
20+
"Framework :: Django :: 5.2",
21+
"Framework :: Django :: 6",
22+
"Framework :: Django :: 6.0",
23+
"Intended Audience :: Developers",
24+
"License :: OSI Approved :: BSD License",
25+
"Operating System :: OS Independent",
26+
"Programming Language :: Python",
27+
"Programming Language :: Python :: 3 :: Only",
28+
"Programming Language :: Python :: 3.10",
29+
"Programming Language :: Python :: 3.11",
30+
"Programming Language :: Python :: 3.12",
31+
"Programming Language :: Python :: 3.13",
32+
"Programming Language :: Python :: 3.14",
33+
"Topic :: Software Development :: Libraries",
34+
"Topic :: Utilities",
3535
]
3636

3737
dependencies = [
38-
"django>=4.2",
39-
"valkey>=6.0.2",
38+
"django>=4.2",
39+
"valkey>=6.0.2",
4040
]
4141

42-
43-
[project.optional-dependencies]
44-
libvalkey = [
45-
"libvalkey>=4.0.1",
42+
optional-dependencies.brotli = [
43+
"brotli>=1.1",
4644
]
47-
lz4 = [
48-
"lz4>=4.3.3",
45+
optional-dependencies.libvalkey = [
46+
"libvalkey>=4.0.1",
4947
]
50-
pyzstd = [
51-
"pyzstd>=0.16.2",
48+
optional-dependencies.lz4 = [
49+
"lz4>=4.3.3",
5250
]
53-
msgpack = [
54-
"msgpack>=1.1.0",
51+
optional-dependencies.msgpack = [
52+
"msgpack>=1.1",
5553
]
56-
brotli = [
57-
"brotli>=1.1.0",
54+
optional-dependencies.pyzstd = [
55+
"pyzstd>=0.16.2",
5856
]
57+
urls.Documentation = "https://django-valkey.readthedocs.io/en/latest/"
58+
urls.Homepage = "https://github.com/django-utils/django-valkey"
59+
urls.Issues = "https://github.com/django-utils/django-valkey/issues"
60+
urls.Source = "https://github.com/django-utils/django-valkey"
5961

6062
[dependency-groups]
6163
dev = [
62-
"anyio>=4.9.0",
63-
"coverage>=7.8.0",
64-
"django-cmd>=2.6",
65-
"django-coverage-plugin>=3.1.0",
66-
"django-stubs>=5.1.3",
67-
"invoke>=2.2.0",
68-
"mypy>=1.15.0",
69-
"pre-commit>=4.2.0",
70-
"pytest>=8.3.5",
71-
"pytest-django>=4.11.1",
72-
"pytest-mock>=3.14.0",
73-
"pytest-subtests>=0.14.1",
74-
"ruff>=0.12.5",
64+
"anyio>=4.9",
65+
"coverage>=7.8",
66+
"django-cmd>=2.6",
67+
"django-coverage-plugin>=3.1",
68+
"django-stubs>=5.1.3",
69+
"invoke>=2.2",
70+
"mypy>=1.15",
71+
"pre-commit>=4.2",
72+
"pytest>=8.3.5",
73+
"pytest-django>=4.11.1",
74+
"pytest-mock>=3.14",
75+
"pytest-subtests>=0.14.1",
76+
"ruff>=0.12.5",
7577
]
7678
docs = [
77-
"mkdocs>=1.6.1",
78-
"mkdocs-awesome-nav>=3.1.1",
79-
"mkdocs-material>=9.6.12",
79+
"mkdocs>=1.6.1",
80+
"mkdocs-awesome-nav>=3.1.1",
81+
"mkdocs-material>=9.6.12",
8082
]
8183
ipython = [
82-
"ipython>=8.35.0",
84+
"ipython>=8.35",
8385
]
8486

85-
[project.urls]
86-
Homepage = "https://github.com/django-utils/django-valkey"
87-
Source = "https://github.com/django-utils/django-valkey"
88-
Issues = "https://github.com/django-utils/django-valkey/issues"
89-
Documentation = "https://django-valkey.readthedocs.io/en/latest/"
87+
[tool.ruff]
88+
lint.per-file-ignores."__init__.py" = [ "E402", "F401", "F403" ]
89+
90+
[tool.codespell]
91+
ignore-words-list = "aadd,asend,smove"
9092

93+
[tool.pytest.ini_options]
94+
DJANGO_SETTINGS_MODULE = "tests.settings.sqlite"
9195

96+
[tool.coverage.run]
97+
plugins = [ "django_coverage_plugin" ]
98+
parallel = true
9299

93100
[tool.mypy]
94-
plugins = ["mypy_django_plugin.main"]
101+
plugins = [ "mypy_django_plugin.main" ]
95102
pretty = true
96103
show_error_codes = true
97104
show_error_context = true
@@ -102,16 +109,3 @@ warn_unreachable = true
102109
[tool.django-stubs]
103110
django_settings_module = "tests.settings.sqlite"
104111
ignore_missing_settings = true
105-
106-
[tool.pytest.ini_options]
107-
DJANGO_SETTINGS_MODULE = "tests.settings.sqlite"
108-
109-
[tool.coverage.run]
110-
plugins = ["django_coverage_plugin"]
111-
parallel = true
112-
113-
[tool.codespell]
114-
ignore-words-list = "aadd,asend,smove"
115-
116-
[tool.ruff.lint.per-file-ignores]
117-
"__init__.py" = ["E402", "F401", "F403"]

0 commit comments

Comments
 (0)