From 8b1fd83366eeae0a11146bf50291a66362063a3c Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 22 Nov 2018 14:54:36 +0100 Subject: [PATCH] mypy: Fix AbstractSettings default values --- qutebrowser/config/websettings.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/qutebrowser/config/websettings.py b/qutebrowser/config/websettings.py index fb80c543b..659f793f8 100644 --- a/qutebrowser/config/websettings.py +++ b/qutebrowser/config/websettings.py @@ -19,6 +19,8 @@ """Bridge from QWeb(Engine)Settings to our own settings.""" +import typing + from PyQt5.QtGui import QFont from qutebrowser.config import config, configutils @@ -44,10 +46,10 @@ class AbstractSettings: """Abstract base class for settings set via QWeb(Engine)Settings.""" - _ATTRIBUTES = None - _FONT_SIZES = None - _FONT_FAMILIES = None - _FONT_TO_QFONT = None + _ATTRIBUTES = {} # type: typing.Dict[str, AttributeInfo] + _FONT_SIZES = {} # type: typing.Dict[str, typing.Any] + _FONT_FAMILIES = {} # type: typing.Dict[str, typing.Any] + _FONT_TO_QFONT = {} # type: typing.Dict[typing.Any, QFont.StyleHint] def __init__(self, settings): self._settings = settings