refactor(treewide): formatting and ruff fixes, + manually enabled F401
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
diff --git a/erpnext/projects/utils.py b/erpnext/projects/utils.py
index 3cc4da4..5046d01 100644
--- a/erpnext/projects/utils.py
+++ b/erpnext/projects/utils.py
@@ -19,13 +19,14 @@
return frappe.db.sql(
"""select name, subject from `tabTask`
- where (`%s` like %s or `subject` like %s) %s
+ where (`{}` like {} or `subject` like {}) {}
order by
- case when `subject` like %s then 0 else 1 end,
- case when `%s` like %s then 0 else 1 end,
- `%s`,
+ case when `subject` like {} then 0 else 1 end,
+ case when `{}` like {} then 0 else 1 end,
+ `{}`,
subject
- limit %s offset %s"""
- % (searchfield, "%s", "%s", match_conditions, "%s", searchfield, "%s", searchfield, "%s", "%s"),
+ limit {} offset {}""".format(
+ searchfield, "%s", "%s", match_conditions, "%s", searchfield, "%s", searchfield, "%s", "%s"
+ ),
(search_string, search_string, order_by_string, order_by_string, page_len, start),
)