style: format code with black
diff --git a/erpnext/utilities/bot.py b/erpnext/utilities/bot.py
index 87a3508..5c2e576 100644
--- a/erpnext/utilities/bot.py
+++ b/erpnext/utilities/bot.py
@@ -9,13 +9,16 @@
class FindItemBot(BotParser):
def get_reply(self):
- if self.startswith('where is', 'find item', 'locate'):
- if not frappe.has_permission('Warehouse'):
+ if self.startswith("where is", "find item", "locate"):
+ if not frappe.has_permission("Warehouse"):
raise frappe.PermissionError
- item = '%{0}%'.format(self.strip_words(self.query, 'where is', 'find item', 'locate'))
- items = frappe.db.sql('''select name from `tabItem` where item_code like %(txt)s
- or item_name like %(txt)s or description like %(txt)s''', dict(txt=item))
+ item = "%{0}%".format(self.strip_words(self.query, "where is", "find item", "locate"))
+ items = frappe.db.sql(
+ """select name from `tabItem` where item_code like %(txt)s
+ or item_name like %(txt)s or description like %(txt)s""",
+ dict(txt=item),
+ )
if items:
out = []
@@ -23,14 +26,19 @@
for item in items:
found = False
for warehouse in warehouses:
- qty = frappe.db.get_value("Bin", {'item_code': item[0], 'warehouse': warehouse.name}, 'actual_qty')
+ qty = frappe.db.get_value(
+ "Bin", {"item_code": item[0], "warehouse": warehouse.name}, "actual_qty"
+ )
if qty:
- out.append(_('{0} units of [{1}](/app/Form/Item/{1}) found in [{2}](/app/Form/Warehouse/{2})').format(qty,
- item[0], warehouse.name))
+ out.append(
+ _("{0} units of [{1}](/app/Form/Item/{1}) found in [{2}](/app/Form/Warehouse/{2})").format(
+ qty, item[0], warehouse.name
+ )
+ )
found = True
if not found:
- out.append(_('[{0}](/app/Form/Item/{0}) is out of stock').format(item[0]))
+ out.append(_("[{0}](/app/Form/Item/{0}) is out of stock").format(item[0]))
return "\n\n".join(out)