style: format code with black

This commit is contained in:
Ankush Menat
2022-03-28 18:52:46 +05:30
parent 21e00da3d6
commit 494bd9ef78
1395 changed files with 91704 additions and 62532 deletions

View File

@@ -8,17 +8,30 @@ def execute():
frappe.reload_doc("portal", "doctype", "website_attribute")
products_settings_fields = [
"hide_variants", "products_per_page",
"enable_attribute_filters", "enable_field_filters"
"hide_variants",
"products_per_page",
"enable_attribute_filters",
"enable_field_filters",
]
shopping_cart_settings_fields = [
"enabled", "show_attachments", "show_price",
"show_stock_availability", "enable_variants", "show_contact_us_button",
"show_quantity_in_website", "show_apply_coupon_code_in_website",
"allow_items_not_in_stock", "company", "price_list", "default_customer_group",
"quotation_series", "enable_checkout", "payment_success_url",
"payment_gateway_account", "save_quotations_as_draft"
"enabled",
"show_attachments",
"show_price",
"show_stock_availability",
"enable_variants",
"show_contact_us_button",
"show_quantity_in_website",
"show_apply_coupon_code_in_website",
"allow_items_not_in_stock",
"company",
"price_list",
"default_customer_group",
"quotation_series",
"enable_checkout",
"payment_success_url",
"payment_gateway_account",
"save_quotations_as_draft",
]
settings = frappe.get_doc("E Commerce Settings")
@@ -27,12 +40,8 @@ def execute():
singles = frappe.qb.DocType("Singles")
query = (
frappe.qb.from_(singles)
.select(
singles["field"], singles.value
).where(
(singles.doctype == doctype)
& (singles["field"].isin(fields))
)
.select(singles["field"], singles.value)
.where((singles.doctype == doctype) & (singles["field"].isin(fields)))
)
data = query.run(as_dict=True)
@@ -54,9 +63,6 @@ def execute():
frappe.db.set_value(
doctype,
{"parent": "Products Settings"},
{
"parenttype": "E Commerce Settings",
"parent": "E Commerce Settings"
},
update_modified=False
{"parenttype": "E Commerce Settings", "parent": "E Commerce Settings"},
update_modified=False,
)