Skip to content

Commit 97b49d1

Browse files
committed
Merge remote-tracking branch 'origin/pre-commit-ci-update-config'
* origin/pre-commit-ci-update-config: [pre-commit.ci] auto fixes from pre-commit.com hooks [pre-commit.ci] pre-commit autoupdate
2 parents 25c860e + 2990290 commit 97b49d1

File tree

4 files changed

+31
-32
lines changed

4 files changed

+31
-32
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repos:
1414
hooks:
1515
- id: doc8
1616
- repo: https://github.com/adamchainz/django-upgrade
17-
rev: 1.16.0
17+
rev: 1.17.0
1818
hooks:
1919
- id: django-upgrade
2020
args: [--target-version, "4.2"]
@@ -32,7 +32,7 @@ repos:
3232
args:
3333
- --trailing-comma=es5
3434
- repo: https://github.com/pre-commit/mirrors-eslint
35-
rev: v9.0.0
35+
rev: v9.3.0
3636
hooks:
3737
- id: eslint
3838
additional_dependencies:
@@ -44,16 +44,16 @@ repos:
4444
args:
4545
- --fix
4646
- repo: https://github.com/astral-sh/ruff-pre-commit
47-
rev: 'v0.3.7'
47+
rev: 'v0.4.5'
4848
hooks:
4949
- id: ruff
5050
args: [--fix, --exit-non-zero-on-fix]
5151
- id: ruff-format
5252
- repo: https://github.com/tox-dev/pyproject-fmt
53-
rev: 1.7.0
53+
rev: 2.1.3
5454
hooks:
5555
- id: pyproject-fmt
5656
- repo: https://github.com/abravalheri/validate-pyproject
57-
rev: v0.16
57+
rev: v0.18
5858
hooks:
5959
- id: validate-pyproject

debug_toolbar/panels/templates/panel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def process_context_list(self, context_layers):
158158
f"<<{value.__class__.__name__.lower()} of {value.model._meta.label}>>"
159159
)
160160
else:
161-
token = allow_sql.set(False) # noqa: FBT003
161+
token = allow_sql.set(False)
162162
try:
163163
saferepr(value) # this MAY trigger a db query
164164
except SQLQueryTriggered:

pyproject.toml

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ requires = [
88
name = "django-debug-toolbar"
99
description = "A configurable set of panels that display various debug information about the current request/response."
1010
readme = "README.rst"
11-
license = {text = "BSD-3-Clause"}
11+
license = { text = "BSD-3-Clause" }
1212
authors = [
13-
{ name = "Rob Hudson" },
13+
{ name = "Rob Hudson" },
1414
]
1515
requires-python = ">=3.8"
1616
classifiers = [
@@ -35,32 +35,32 @@ dynamic = [
3535
"version",
3636
]
3737
dependencies = [
38-
"Django>=4.2.9",
38+
"django>=4.2.9",
3939
"sqlparse>=0.2",
4040
]
41-
[project.urls]
42-
Download = "https://pypi.org/project/django-debug-toolbar/"
43-
Homepage = "https://github.com/jazzband/django-debug-toolbar"
41+
urls.Download = "https://pypi.org/project/django-debug-toolbar/"
42+
urls.Homepage = "https://github.com/jazzband/django-debug-toolbar"
4443

4544
[tool.hatch.build.targets.sdist]
4645
# Jazzband's release process is limited to 2.2 metadata
4746
core-metadata-version = "2.2"
4847

4948
[tool.hatch.build.targets.wheel]
50-
packages = ["debug_toolbar"]
49+
packages = [
50+
"debug_toolbar",
51+
]
5152
# Jazzband's release process is limited to 2.2 metadata
5253
core-metadata-version = "2.2"
5354

5455
[tool.hatch.version]
5556
path = "debug_toolbar/__init__.py"
5657

5758
[tool.ruff]
58-
fix = true
59-
show-fixes = true
6059
target-version = "py38"
6160

62-
[tool.ruff.lint]
63-
extend-select = [
61+
fix = true
62+
show-fixes = true
63+
lint.extend-select = [
6464
"ASYNC", # flake8-async
6565
"B", # flake8-bugbear
6666
"C4", # flake8-comprehensions
@@ -79,23 +79,17 @@ extend-select = [
7979
"UP", # pyupgrade
8080
"W", # pycodestyle warnings
8181
]
82-
extend-ignore = [
82+
lint.extend-ignore = [
8383
"B905", # Allow zip() without strict=
8484
"E501", # Ignore line length violations
8585
"SIM108", # Use ternary operator instead of if-else-block
8686
]
87-
88-
[tool.ruff.lint.isort]
89-
combine-as-imports = true
90-
91-
[tool.ruff.lint.mccabe]
92-
max-complexity = 16
93-
94-
[tool.ruff.lint.per-file-ignores]
95-
"*/migrat*/*" = [
96-
"N806", # Allow using PascalCase model names in migrations
97-
"N999", # Ignore the fact that migration files are invalid module names
87+
lint.per-file-ignores."*/migrat*/*" = [
88+
"N806", # Allow using PascalCase model names in migrations
89+
"N999", # Ignore the fact that migration files are invalid module names
9890
]
91+
lint.isort.combine-as-imports = true
92+
lint.mccabe.max-complexity = 16
9993

10094
[tool.coverage.html]
10195
skip_covered = true
@@ -104,10 +98,15 @@ skip_empty = true
10498
[tool.coverage.run]
10599
branch = true
106100
parallel = true
107-
source = ["debug_toolbar"]
101+
source = [
102+
"debug_toolbar",
103+
]
108104

109105
[tool.coverage.paths]
110-
source = ["src", ".tox/*/site-packages"]
106+
source = [
107+
"src",
108+
".tox/*/site-packages",
109+
]
111110

112111
[tool.coverage.report]
113112
# Update coverage badge link in README.rst when fail_under changes

tests/panels/test_sql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ async def test_cursor_wrapper_asyncio_ctx(self, mock_patch_cursor_wrapper):
126126
await sync_to_async(sql_call)()
127127

128128
async def task():
129-
sql_tracking.allow_sql.set(False) # noqa: FBT003
129+
sql_tracking.allow_sql.set(False)
130130
# By disabling sql_tracking.allow_sql, we are indicating that any
131131
# future SQL queries should be stopped. If SQL query occurs,
132132
# it raises an exception.

0 commit comments

Comments
 (0)