style: apply ruff formatter

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Mihir Kandoi
2026-07-01 17:04:11 +05:30
parent e6f8f8f7e9
commit 8271b29e42
2 changed files with 6 additions and 7 deletions

View File

@@ -180,7 +180,10 @@ def normalize_ctx_input(T: type) -> callable:
def decorator(func: callable):
# conserve annotations for frappe.utils.typing_validations
@functools.wraps(
func, assigned=(a for a in functools.WRAPPER_ASSIGNMENTS if a not in ("__annotations__", "__annotate__"))
func,
assigned=(
a for a in functools.WRAPPER_ASSIGNMENTS if a not in ("__annotations__", "__annotate__")
),
)
def wrapper(ctx: T | Document | dict | str, *args, **kwargs):
if isinstance(ctx, Document):

View File

@@ -742,9 +742,7 @@ def get_item_tax_info(
@frappe.whitelist()
@erpnext.normalize_ctx_input(ItemDetailsCtx)
def get_item_tax_template(
ctx: ItemDetailsCtx, item: Document | None = None, out: frappe._dict | None = None
):
def get_item_tax_template(ctx: ItemDetailsCtx, item: Document | None = None, out: frappe._dict | None = None):
"""
Determines item_tax template from item or parent item groups.
@@ -1214,9 +1212,7 @@ def _get_stock_uom_rate(rate: float, ctx: frappe._dict):
return rate / ctx.conversion_factor if ctx.conversion_factor else rate
def get_item_price(
pctx: frappe._dict, item_code, ignore_party=False, force_batch_no=False
) -> list[dict]:
def get_item_price(pctx: frappe._dict, item_code, ignore_party=False, force_batch_no=False) -> list[dict]:
"""
Get name, price_list_rate from Item Price based on conditions
Check if the desired qty is within the increment of the packing list.