Skip to content

Commit f827bc2

Browse files
Copilotnijel
andcommitted
Add type annotations to nested filter functions in generate_svg_stacked_bar_chart
Co-authored-by: nijel <[email protected]>
1 parent 556f01c commit f827bc2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

weblate_web/crm/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ def generate_svg_stacked_bar_chart( # noqa: PLR0914
494494
num_bars = calendar.monthrange(year, month)[1]
495495
bar_labels = [str(d) for d in range(1, num_bars + 1)]
496496

497-
def filter_by_day(inv, idx):
497+
def filter_by_day(inv: Invoice, idx: int) -> bool:
498498
return inv.issue_date.day == idx + 1
499499

500500
filter_func = filter_by_day
@@ -504,7 +504,7 @@ def filter_by_day(inv, idx):
504504
num_bars = 12
505505
bar_labels = [f"{m:02d}" for m in range(1, 13)]
506506

507-
def filter_by_month(inv, idx):
507+
def filter_by_month(inv: Invoice, idx: int) -> bool:
508508
return inv.issue_date.month == idx + 1
509509

510510
filter_func = filter_by_month

0 commit comments

Comments
 (0)