diff --git a/frappe/database/query.py b/frappe/database/query.py index 70127dd9d9..f608539854 100644 --- a/frappe/database/query.py +++ b/frappe/database/query.py @@ -1,7 +1,7 @@ import operator import re from functools import cached_property -from typing import Any, Dict, List, Tuple, Union +from typing import Any, Callable, Dict, List, Tuple, Union import frappe from frappe import _ @@ -141,7 +141,7 @@ def change_orderby(order: str): # default operators -OPERATOR_MAP: Dict[str, "function"] = { +OPERATOR_MAP: Dict[str, Callable] = { "+": operator.add, "=": operator.eq, "-": operator.sub, diff --git a/frappe/utils/identicon.py b/frappe/utils/identicon.py index 28df486d03..448f24657c 100644 --- a/frappe/utils/identicon.py +++ b/frappe/utils/identicon.py @@ -104,4 +104,4 @@ class Identicon(object): save_handler(self.image, fp, "") finally: fp.seek(0) - return "data:image/png;base64,{0}".format(base64.b64encode(fp.read())) + return "data:image/png;base64,{0}".format(base64.b64encode(fp.read())) # noqa