Skip to content

Commit 2990290

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 8391469 commit 2990290

File tree

3 files changed

+26
-27
lines changed

3 files changed

+26
-27
lines changed

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,26 +35,26 @@ 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.wheel]
46-
packages = ["debug_toolbar"]
45+
packages = [
46+
"debug_toolbar",
47+
]
4748

4849
[tool.hatch.version]
4950
path = "debug_toolbar/__init__.py"
5051

5152
[tool.ruff]
52-
fix = true
53-
show-fixes = true
5453
target-version = "py38"
5554

56-
[tool.ruff.lint]
57-
extend-select = [
55+
fix = true
56+
show-fixes = true
57+
lint.extend-select = [
5858
"ASYNC", # flake8-async
5959
"B", # flake8-bugbear
6060
"C4", # flake8-comprehensions
@@ -73,23 +73,17 @@ extend-select = [
7373
"UP", # pyupgrade
7474
"W", # pycodestyle warnings
7575
]
76-
extend-ignore = [
76+
lint.extend-ignore = [
7777
"B905", # Allow zip() without strict=
7878
"E501", # Ignore line length violations
7979
"SIM108", # Use ternary operator instead of if-else-block
8080
]
81-
82-
[tool.ruff.lint.isort]
83-
combine-as-imports = true
84-
85-
[tool.ruff.lint.mccabe]
86-
max-complexity = 16
87-
88-
[tool.ruff.lint.per-file-ignores]
89-
"*/migrat*/*" = [
90-
"N806", # Allow using PascalCase model names in migrations
91-
"N999", # Ignore the fact that migration files are invalid module names
81+
lint.per-file-ignores."*/migrat*/*" = [
82+
"N806", # Allow using PascalCase model names in migrations
83+
"N999", # Ignore the fact that migration files are invalid module names
9284
]
85+
lint.isort.combine-as-imports = true
86+
lint.mccabe.max-complexity = 16
9387

9488
[tool.coverage.html]
9589
skip_covered = true
@@ -98,10 +92,15 @@ skip_empty = true
9892
[tool.coverage.run]
9993
branch = true
10094
parallel = true
101-
source = ["debug_toolbar"]
95+
source = [
96+
"debug_toolbar",
97+
]
10298

10399
[tool.coverage.paths]
104-
source = ["src", ".tox/*/site-packages"]
100+
source = [
101+
"src",
102+
".tox/*/site-packages",
103+
]
105104

106105
[tool.coverage.report]
107106
# 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)