fix: add missing type hints to whitelisted function arguments

(cherry picked from commit 124ec4d3c2)
This commit is contained in:
Krishna Shirsath
2026-02-27 12:53:44 +05:30
committed by Mergify
parent 0b3c9120c3
commit b115913fc9
2 changed files with 4 additions and 2 deletions

View File

@@ -680,7 +680,7 @@ class ProductionPlan(Document):
frappe.delete_doc("Work Order", d.name)
@frappe.whitelist()
def set_status(self, close=None, update_bin=False):
def set_status(self, close: bool | None = None, update_bin: bool = False) -> None:
self.status = {0: "Draft", 1: "Submitted", 2: "Cancelled"}.get(self.docstatus)
if close:

View File

@@ -416,7 +416,9 @@ def deactivate_sales_person(status=None, employee=None):
@frappe.whitelist()
def create_user(employee, user=None, email=None, create_user_permission=0):
def create_user(
employee: str, user: str | None = None, email: str | None = None, create_user_permission: int = 0
) -> str:
if not employee:
frappe.throw(_("Employee is required"))