From 51cdc959b1df6a319f9cee3de49d6d313a0d2041 Mon Sep 17 00:00:00 2001 From: herr kaste Date: Thu, 2 Nov 2023 13:54:49 +0100 Subject: [PATCH] Add type hint to remove a "type: ignore" comment --- common/util/view.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/common/util/view.py b/common/util/view.py index 032f29b9c..0b9937993 100644 --- a/common/util/view.py +++ b/common/util/view.py @@ -8,7 +8,7 @@ MYPY = False if MYPY: - from typing import Mapping, Optional + from typing import Callable, Mapping, Optional ############## @@ -91,12 +91,11 @@ def update_view(view, options): "title": view.set_name, "scratch": view.set_scratch, "read_only": view.set_read_only, - } - + } # type: Mapping[str, Callable] settings = view.settings() for k, v in options.items(): if k in special_setters: - special_setters[k](v) # type: ignore[operator] + special_setters[k](v) else: settings.set(k, v)