summaryrefslogtreecommitdiff
path: root/qutebrowser/components
diff options
context:
space:
mode:
authorÁrni Dagur <arnidg@protonmail.ch>2020-10-30 01:14:02 +0000
committerÁrni Dagur <arni@dagur.eu>2020-12-19 20:29:51 +0000
commit93f3ab3305e0d714d791a2e1bd7e07468db1f6f6 (patch)
treefc43f3aaecdfa0a74614a454ce4edbcf37a41828 /qutebrowser/components
parente57b6e0eeeb656eb2c84d6547d5a0a7333ecee85 (diff)
downloadqutebrowser-93f3ab3305e0d714d791a2e1bd7e07468db1f6f6.tar.gz
qutebrowser-93f3ab3305e0d714d791a2e1bd7e07468db1f6f6.zip
Make pylint and flake8 happier
Diffstat (limited to 'qutebrowser/components')
-rw-r--r--qutebrowser/components/adblock.py3
-rw-r--r--qutebrowser/components/braveadblock.py1
-rw-r--r--qutebrowser/components/utils/blockutils.py16
3 files changed, 8 insertions, 12 deletions
diff --git a/qutebrowser/components/adblock.py b/qutebrowser/components/adblock.py
index a44d5eae5..bd77ea47b 100644
--- a/qutebrowser/components/adblock.py
+++ b/qutebrowser/components/adblock.py
@@ -24,7 +24,7 @@ import posixpath
import zipfile
import logging
import pathlib
-from typing import cast, IO, List, Set
+from typing import cast, IO, Set
from PyQt5.QtCore import QUrl
@@ -32,7 +32,6 @@ from qutebrowser.api import (
hook,
config,
message,
- downloads,
interceptor,
apitypes,
qtutils,
diff --git a/qutebrowser/components/braveadblock.py b/qutebrowser/components/braveadblock.py
index 142e6cc42..3a8f5b7d0 100644
--- a/qutebrowser/components/braveadblock.py
+++ b/qutebrowser/components/braveadblock.py
@@ -31,7 +31,6 @@ from qutebrowser.api import (
hook,
config,
message,
- downloads,
interceptor,
apitypes,
qtutils,
diff --git a/qutebrowser/components/utils/blockutils.py b/qutebrowser/components/utils/blockutils.py
index 597992755..e7f4a269b 100644
--- a/qutebrowser/components/utils/blockutils.py
+++ b/qutebrowser/components/utils/blockutils.py
@@ -23,8 +23,6 @@
import typing
import os
import functools
-import threading
-import io
from PyQt5.QtCore import QUrl, QObject, pyqtSignal
@@ -45,14 +43,13 @@ class BlocklistDownloads(QObject):
"""Download blocklists from the given URLs.
Attributes:
+ single_download_finished:
+ A signal that is emitted when a single download has finished. The
+ listening slot is provided with the download object.
+ all_downloads_finished:
+ A signal that is emitted when all downloads have finished. The
+ first argument is the number of items downloaded.
_urls: The URLs to download.
- _user_cb_single:
- A user-provided function to be called when a single download has
- finished. The user is provided with the download object.
- _user_cb_all:
- A user-provided function to be called when all downloads have
- finished. The first argument to the function is the number of
- items downloaded.
_in_progress: The DownloadItems which are currently downloading.
_done_count: How many files have been read successfully.
_finished_registering_downloads:
@@ -79,6 +76,7 @@ class BlocklistDownloads(QObject):
self._finished = False
def initiate(self) -> None:
+ """Initiate downloads of each url in `self._urls`."""
if self._started:
raise ValueError("This download has already been initiated")
self._started = True