Skip to content

Update ruff target to py39 #460

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions django_prometheus/db/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,18 @@ class CursorWrapper(cursor_class):

def execute(self, *args, **kwargs):
execute_total.labels(alias, vendor).inc()
with query_duration_seconds.labels(**labels).time(), ExceptionCounterByType(
errors_total, extra_labels=labels
with (
query_duration_seconds.labels(**labels).time(),
ExceptionCounterByType(errors_total, extra_labels=labels),
):
return super().execute(*args, **kwargs)

def executemany(self, query, param_list, *args, **kwargs):
execute_total.labels(alias, vendor).inc(len(param_list))
execute_many_total.labels(alias, vendor).inc(len(param_list))
with query_duration_seconds.labels(**labels).time(), ExceptionCounterByType(
errors_total, extra_labels=labels
with (
query_duration_seconds.labels(**labels).time(),
ExceptionCounterByType(errors_total, extra_labels=labels),
):
return super().executemany(query, param_list, *args, **kwargs)

Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ addopts = " --ignore django_prometheus/tests/end2end"

[tool.ruff]
line-length = 120
target-version = "py38"
target-version = "py39"

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