Skip to content

Commit b5780cf

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

File tree

3 files changed

+25
-20
lines changed

3 files changed

+25
-20
lines changed

debug_toolbar/panels/templates/panel.py

+1-1
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

+23-18
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,15 +35,15 @@ 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"
44-
41+
urls.Download = "https://pypi.org/project/django-debug-toolbar/"
42+
urls.Homepage = "https://github.com/jazzband/django-debug-toolbar"
4543
[tool.hatch.build.targets.wheel]
46-
packages = ["debug_toolbar"]
44+
packages = [
45+
"debug_toolbar",
46+
]
4747

4848
[tool.hatch.version]
4949
path = "debug_toolbar/__init__.py"
@@ -53,6 +53,9 @@ fix = true
5353
show-fixes = true
5454
target-version = "py38"
5555

56+
[tool.ruff.lint.mccabe]
57+
max-complexity = 16
58+
5659
[tool.ruff.lint]
5760
extend-select = [
5861
"ASYNC", # flake8-async
@@ -79,29 +82,31 @@ extend-ignore = [
7982
"SIM108", # Use ternary operator instead of if-else-block
8083
]
8184

82-
[tool.ruff.lint.isort]
83-
combine-as-imports = true
84-
85-
[tool.ruff.lint.mccabe]
86-
max-complexity = 16
87-
8885
[tool.ruff.lint.per-file-ignores]
8986
"*/migrat*/*" = [
90-
"N806", # Allow using PascalCase model names in migrations
91-
"N999", # Ignore the fact that migration files are invalid module names
87+
"N806", # Allow using PascalCase model names in migrations
88+
"N999", # Ignore the fact that migration files are invalid module names
9289
]
9390

91+
[tool.ruff.lint.isort]
92+
combine-as-imports = true
93+
9494
[tool.coverage.html]
9595
skip_covered = true
9696
skip_empty = true
9797

9898
[tool.coverage.run]
9999
branch = true
100100
parallel = true
101-
source = ["debug_toolbar"]
101+
source = [
102+
"debug_toolbar",
103+
]
102104

103105
[tool.coverage.paths]
104-
source = ["src", ".tox/*/site-packages"]
106+
source = [
107+
"src",
108+
".tox/*/site-packages",
109+
]
105110

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

tests/panels/test_sql.py

+1-1
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)