Skip to content

Commit 0c08d82

Browse files
committed
fix ruff
1 parent 1cf8f1f commit 0c08d82

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

dojo/jira_link/views.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ def post(self, request):
387387
create_notification(
388388
event="jira_config_added",
389389
title=f"New addition of JIRA: {jform.cleaned_data.get('configuration_name')}",
390-
description=f"JIRA \"{jform.cleaned_data.get('configuration_name')}\" was added by {request.user}",
390+
description=f'JIRA "{jform.cleaned_data.get('configuration_name')}" was added by {request.user}',
391391
url=request.build_absolute_uri(reverse("jira")))
392392

393393
return HttpResponseRedirect(reverse("jira"))
@@ -432,7 +432,7 @@ def post(self, request):
432432
create_notification(
433433
event="jira_config_added",
434434
title=f"New addition of JIRA: {jform.cleaned_data.get('configuration_name')}",
435-
description=f"JIRA \"{jform.cleaned_data.get('configuration_name')}\" was added by {request.user}",
435+
description=f'JIRA "{jform.cleaned_data.get('configuration_name')}" was added by {request.user}',
436436
url=request.build_absolute_uri(reverse("jira")))
437437

438438
return HttpResponseRedirect(reverse("jira"))
@@ -486,7 +486,7 @@ def post(self, request, jid=None):
486486
create_notification(
487487
event="jira_config_edited",
488488
title=f"Edit of JIRA: {jform.cleaned_data.get('configuration_name')}",
489-
description=f"JIRA \"{jform.cleaned_data.get('configuration_name')}\" was edited by {request.user}",
489+
description=f'JIRA "{jform.cleaned_data.get('configuration_name')}" was edited by {request.user}',
490490
url=request.build_absolute_uri(reverse("jira")))
491491

492492
return HttpResponseRedirect(reverse("jira"))

dojo/metrics/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ def get_date_range(
343343
return start_date, end_date
344344

345345

346-
def severity_count(
346+
def severity_count[MetricsQuerySet: (QuerySet[Finding], QuerySet[Endpoint_Status])](
347347
queryset: MetricsQuerySet,
348348
method: str,
349349
expression: str,
@@ -407,7 +407,7 @@ def js_epoch(
407407
return int(d.timestamp()) * 1000
408408

409409

410-
def get_charting_data(
410+
def get_charting_data[MetricsQuerySet: (QuerySet[Finding], QuerySet[Endpoint_Status])](
411411
qs: MetricsQuerySet,
412412
start_date: date,
413413
period: MetricsPeriod,
@@ -470,7 +470,7 @@ def period_deltas(start_date, end_date):
470470
return weeks_between, months_between
471471

472472

473-
def aggregate_counts_by_period(
473+
def aggregate_counts_by_period[MetricsQuerySet: (QuerySet[Finding], QuerySet[Endpoint_Status])](
474474
qs: MetricsQuerySet,
475475
period: MetricsPeriod,
476476
metrics_type: MetricsType,
@@ -580,7 +580,7 @@ def get_closed_in_period_details(
580580
)
581581

582582

583-
def findings_queryset(
583+
def findings_queryset[MetricsQuerySet: (QuerySet[Finding], QuerySet[Endpoint_Status])](
584584
qs: MetricsQuerySet,
585585
) -> QuerySet[Finding]:
586586
"""

ruff.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Always generate Python 3.11-compatible code.
2-
target-version = "py311"
1+
# Always generate Python 3.13-compatible code.
2+
target-version = "py313"
33

44
# Same as Black.
55
line-length = 120

0 commit comments

Comments
 (0)