refactor: add type hints to parameters in run function

This commit is contained in:
Abdeali Chharchhoda 2026-02-06 23:15:13 +05:30
parent 861c450ca6
commit e12d58209d

View file

@ -199,17 +199,17 @@ def get_reference_report(report):
@frappe.whitelist()
@frappe.read_only()
def run(
report_name,
filters=None,
user=None,
ignore_prepared_report=False,
custom_columns=None,
is_tree=False,
parent_field=None,
are_default_filters=True,
js_filters=None,
skip_total_calculation=False,
):
report_name: str,
filters: str | dict | None = None,
user: str | None = None,
ignore_prepared_report: bool = False,
custom_columns: str | list | None = None,
is_tree: bool = False,
parent_field: str | None = None,
are_default_filters: bool = True,
js_filters: str | list | None = None,
skip_total_calculation: bool = False,
) -> dict:
if not user:
user = frappe.session.user
validate_filters_permissions(report_name, filters, user, js_filters)