Skip to content

Commit e71850e

Browse files
pre-commit-ci[bot]tim-schilling
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent da3002f commit e71850e

2 files changed

Lines changed: 24 additions & 35 deletions

File tree

pyproject.toml

Lines changed: 18 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ dependencies = [
4040
"django>=4.2.9",
4141
"sqlparse>=0.2",
4242
]
43-
4443
urls.Changelog = "https://django-debug-toolbar.readthedocs.io/en/latest/changes.html"
4544
urls.Documentation = "https://django-debug-toolbar.readthedocs.io/"
4645
urls.Download = "https://pypi.org/project/django-debug-toolbar/"
@@ -52,39 +51,33 @@ urls.Source = "https://github.com/django-commons/django-debug-toolbar"
5251
dev = [
5352
"black",
5453
"coverage[toml]",
55-
"daphne", # async in Example app
54+
"daphne", # async in Example app
5655
"django",
57-
"django-csp", # Used in tests/test_csp_rendering
58-
56+
"django-csp", # Used in tests/test_csp_rendering
5957
"django-template-partials",
6058
"html5lib",
6159
"jinja2",
6260
"pre-commit",
6361
"pygments",
64-
6562
"selenium",
6663
"sqlparse",
6764
"tox",
68-
"whitenoise", # To avoid dealing with static files
69-
65+
"whitenoise", # To avoid dealing with static files
7066
]
7167
docs = [
7268
"sphinx",
7369
"sphinx-rtd-theme>1",
7470
"sphinxcontrib-spelling",
7571
]
7672

77-
[tool.hatch.build.targets.wheel]
78-
packages = [
73+
[tool.hatch]
74+
build.targets.wheel.packages = [
7975
"debug_toolbar",
8076
]
81-
82-
[tool.hatch.version]
83-
path = "debug_toolbar/__init__.py"
77+
version.path = "debug_toolbar/__init__.py"
8478

8579
[tool.ruff]
8680
target-version = "py310"
87-
8881
fix = true
8982
show-fixes = true
9083
lint.extend-select = [
@@ -117,25 +110,19 @@ lint.per-file-ignores."*/migrat*/*" = [
117110
lint.isort.combine-as-imports = true
118111
lint.mccabe.max-complexity = 16
119112

120-
[tool.coverage.html]
121-
skip_covered = true
122-
skip_empty = true
123-
124-
[tool.coverage.paths]
125-
source = [
113+
[tool.coverage]
114+
run.branch = true
115+
run.parallel = true
116+
run.relative_files = true
117+
run.source = [
118+
"debug_toolbar",
119+
]
120+
paths.source = [
126121
"src",
127122
".tox/*/site-packages",
128123
]
129-
130-
[tool.coverage.report]
131124
# Update coverage badge link in README.rst when fail_under changes
132-
fail_under = 94
133-
show_missing = true
134-
135-
[tool.coverage.run]
136-
branch = true
137-
parallel = true
138-
relative_files = true
139-
source = [
140-
"debug_toolbar",
141-
]
125+
report.fail_under = 94
126+
report.show_missing = true
127+
html.skip_covered = true
128+
html.skip_empty = true

tests/test_integration.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -901,10 +901,12 @@ def test_ajax_refresh(self):
901901
time.sleep(0.1)
902902
# Need to wait until the ajax request is over and json_view is displayed on the toolbar
903903
self.wait.until(
904-
lambda selenium: self.selenium.find_element(
905-
By.CSS_SELECTOR, "#djdt-HistoryPanel a.HistoryPanel small"
906-
).text
907-
== "/json_view/"
904+
lambda selenium: (
905+
self.selenium.find_element(
906+
By.CSS_SELECTOR, "#djdt-HistoryPanel a.HistoryPanel small"
907+
).text
908+
== "/json_view/"
909+
)
908910
)
909911
history_panel = self.selenium.find_element(By.ID, "djdt-HistoryPanel")
910912
self.assertNotIn("/ajax/", history_panel.text)

0 commit comments

Comments
 (0)