mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-17 16:38:41 +00:00
style: apply ruff formatter
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user