From 15af545acfc4d2dc720219d44e4499d495023876 Mon Sep 17 00:00:00 2001 From: gavin Date: Mon, 23 May 2022 18:55:55 +0530 Subject: [PATCH] chore: Update typing + noqa - flake8 failures --- frappe/database/query.py | 4 ++-- frappe/utils/identicon.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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