refactor(asset): added type annotations on get_depreciation_rate

This commit is contained in:
diptanilsaha
2026-03-07 11:48:06 +05:30
parent 208112e7a9
commit b4fb74c84d

View File

@@ -7,6 +7,7 @@ import math
import frappe import frappe
from frappe import _ from frappe import _
from frappe.model.document import Document
from frappe.query_builder.functions import IfNull, Sum from frappe.query_builder.functions import IfNull, Sum
from frappe.utils import ( from frappe.utils import (
cint, cint,
@@ -986,7 +987,7 @@ class Asset(AccountsController):
return False return False
@frappe.whitelist() @frappe.whitelist()
def get_depreciation_rate(self, args, on_validate=False): def get_depreciation_rate(self, args: str | dict | Document, on_validate: bool = False):
if isinstance(args, str): if isinstance(args, str):
args = json.loads(args) args = json.loads(args)