Skip to content

Commit c81edf3

Browse files
Copilotnijel
andcommitted
Fix type annotation for filter_func parameter
Co-authored-by: nijel <212189+nijel@users.noreply.github.com>
1 parent 3758d94 commit c81edf3

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
@@ -588,7 +588,7 @@ def _aggregate_income_by_period(
588588
self,
589589
year: int,
590590
month: int | None,
591-
filter_func: Callable[[object], bool],
591+
filter_func: Callable[[object, str], bool],
592592
period_keys: list[str],
593593
) -> tuple[dict[str, Decimal], list]:
594594
"""
@@ -597,7 +597,7 @@ def _aggregate_income_by_period(
597597
Args:
598598
year: Year to filter invoices
599599
month: Optional month to filter invoices
600-
filter_func: Function that takes an invoice and returns True if it matches the period
600+
filter_func: Function that takes (invoice, key) and returns True if it matches the period
601601
period_keys: List of period keys (e.g., ['01', '02'] for months or ['1', '2'] for days)
602602
603603
Returns:

0 commit comments

Comments
 (0)