Skip to content

Commit f674ed8

Browse files
authored
Update ruff target to py39 (#460)
1 parent f3f0ca1 commit f674ed8

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

django_prometheus/db/common.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,18 @@ class CursorWrapper(cursor_class):
6363

6464
def execute(self, *args, **kwargs):
6565
execute_total.labels(alias, vendor).inc()
66-
with query_duration_seconds.labels(**labels).time(), ExceptionCounterByType(
67-
errors_total, extra_labels=labels
66+
with (
67+
query_duration_seconds.labels(**labels).time(),
68+
ExceptionCounterByType(errors_total, extra_labels=labels),
6869
):
6970
return super().execute(*args, **kwargs)
7071

7172
def executemany(self, query, param_list, *args, **kwargs):
7273
execute_total.labels(alias, vendor).inc(len(param_list))
7374
execute_many_total.labels(alias, vendor).inc(len(param_list))
74-
with query_duration_seconds.labels(**labels).time(), ExceptionCounterByType(
75-
errors_total, extra_labels=labels
75+
with (
76+
query_duration_seconds.labels(**labels).time(),
77+
ExceptionCounterByType(errors_total, extra_labels=labels),
7678
):
7779
return super().executemany(query, param_list, *args, **kwargs)
7880

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ addopts = " --ignore django_prometheus/tests/end2end"
77

88
[tool.ruff]
99
line-length = 120
10-
target-version = "py38"
10+
target-version = "py39"
1111

1212
[tool.ruff.lint]
1313
select = ["B", "C4", "E", "F", "I", "T10", "YTT", "W"]
14-

0 commit comments

Comments
 (0)