refactor(treewide): formatting and ruff fixes, + manually enabled F401
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
diff --git a/erpnext/templates/pages/order.py b/erpnext/templates/pages/order.py
index 41b1384..d8e6334 100644
--- a/erpnext/templates/pages/order.py
+++ b/erpnext/templates/pages/order.py
@@ -36,9 +36,7 @@
context.available_loyalty_points = 0.0
if context.doc.get("customer"):
# check for the loyalty program of the customer
- customer_loyalty_program = frappe.db.get_value(
- "Customer", context.doc.customer, "loyalty_program"
- )
+ customer_loyalty_program = frappe.db.get_value("Customer", context.doc.customer, "loyalty_program")
if customer_loyalty_program:
from erpnext.accounts.doctype.loyalty_program.loyalty_program import (
@@ -67,9 +65,12 @@
def get_payment_details(doc):
show_pay_button, amount = (
- "payments" in frappe.get_installed_apps()
- and frappe.db.get_single_value("Buying Settings", "show_pay_button")
- ), 0
+ (
+ "payments" in frappe.get_installed_apps()
+ and frappe.db.get_single_value("Buying Settings", "show_pay_button")
+ ),
+ 0,
+ )
if not show_pay_button:
return show_pay_button, amount
amount = get_amount(doc)