diff options
author | Florian Bruhin <me@the-compiler.org> | 2019-10-15 22:52:48 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2019-10-15 22:52:48 +0200 |
commit | 7ada7082aa4485a1f5ccc88f05298b17f2997700 (patch) | |
tree | a2e89a9c96e83ab3f1c5524302626048945ae051 /qutebrowser/browser/greasemonkey.py | |
parent | 3a9d0bd3ff46a626ed1700211460ce7ed15bf8db (diff) | |
download | qutebrowser-7ada7082aa4485a1f5ccc88f05298b17f2997700.tar.gz qutebrowser-7ada7082aa4485a1f5ccc88f05298b17f2997700.zip |
mypy: check_untyped_defs for most of qutebrowser.browser
Diffstat (limited to 'qutebrowser/browser/greasemonkey.py')
-rw-r--r-- | qutebrowser/browser/greasemonkey.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/qutebrowser/browser/greasemonkey.py b/qutebrowser/browser/greasemonkey.py index 3a5b60544..6693497d6 100644 --- a/qutebrowser/browser/greasemonkey.py +++ b/qutebrowser/browser/greasemonkey.py @@ -26,6 +26,7 @@ import fnmatch import functools import glob import textwrap +import typing import attr from PyQt5.QtCore import pyqtSignal, QObject, QUrl @@ -50,10 +51,10 @@ class GreasemonkeyScript: def __init__(self, properties, code, # noqa: C901 pragma: no mccabe filename=None): self._code = code - self.includes = [] - self.matches = [] - self.excludes = [] - self.requires = [] + self.includes = [] # type: typing.Sequence[str] + self.matches = [] # type: typing.Sequence[str] + self.excludes = [] # type: typing.Sequence[str] + self.requires = [] # type: typing.Sequence[str] self.description = None self.name = None self.namespace = None @@ -253,10 +254,11 @@ class GreasemonkeyManager(QObject): def __init__(self, parent=None): super().__init__(parent) - self._run_start = [] - self._run_end = [] - self._run_idle = [] - self._in_progress_dls = [] + self._run_start = [] # type: typing.Sequence[GreasemonkeyScript] + self._run_end = [] # type: typing.Sequence[GreasemonkeyScript] + self._run_idle = [] # type: typing.Sequence[GreasemonkeyScript] + self._in_progress_dls = [ + ] # type: typing.Sequence[downloads.AbstractDownloadItem] self.load_scripts() |