style: apply ruff formatter

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit 8271b29e42)

# Conflicts:
#	erpnext/stock/get_item_details.py
This commit is contained in:
Mihir Kandoi
2026-07-01 17:04:11 +05:30
committed by Mergify
parent ed68505825
commit 28c8c1c6cb
2 changed files with 9 additions and 4 deletions

View File

@@ -178,7 +178,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

@@ -805,12 +805,16 @@ def get_item_tax_info(doc, tax_category, item_codes, item_rates=None, item_tax_t
@frappe.whitelist()
@erpnext.normalize_ctx_input(ItemDetailsCtx)
<<<<<<< HEAD
<<<<<<< HEAD
def get_item_tax_template(ctx, item=None, out: ItemDetails | None = None):
=======
def get_item_tax_template(
ctx: ItemDetailsCtx, item: Document | None = None, out: frappe._dict | None = None
):
>>>>>>> 6eeadbdbef (fix: keep normalize_ctx_input's ctx annotation on Python 3.14)
=======
def get_item_tax_template(ctx: ItemDetailsCtx, item: Document | None = None, out: frappe._dict | None = None):
>>>>>>> 8271b29e42 (style: apply ruff formatter)
"""
Determines item_tax template from item or parent item groups.
@@ -1277,9 +1281,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.