From a87e46101c23e66974afa7a5ea1b1f2f80055c33 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 28 Oct 2016 11:31:39 +0200 Subject: [PATCH] Fix lint --- qutebrowser/browser/webkit/downloads.py | 5 ++--- qutebrowser/mainwindow/prompt.py | 8 ++++---- qutebrowser/utils/message.py | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/qutebrowser/browser/webkit/downloads.py b/qutebrowser/browser/webkit/downloads.py index 610dae610..a9c6153f8 100644 --- a/qutebrowser/browser/webkit/downloads.py +++ b/qutebrowser/browser/webkit/downloads.py @@ -119,7 +119,7 @@ def create_full_filename(basename, filename): return None -def ask_for_filename(suggested_filename, win_id, *, parent=None, +def ask_for_filename(suggested_filename, *, parent=None, prompt_download_directory=None): """Prepare a question for a download-path. @@ -133,7 +133,6 @@ def ask_for_filename(suggested_filename, win_id, *, parent=None, Args: suggested_filename: The "default"-name that is pre-entered as path. - win_id: The window where the question will be asked. parent: The parent of the question (a QObject). prompt_download_directory: If this is something else than None, it will overwrite the @@ -954,7 +953,7 @@ class DownloadManager(QObject): # Neither filename nor fileobj were given, prepare a question filename, q = ask_for_filename( - suggested_filename, self._win_id, parent=self, + suggested_filename, parent=self, prompt_download_directory=prompt_download_directory, ) diff --git a/qutebrowser/mainwindow/prompt.py b/qutebrowser/mainwindow/prompt.py index b4b1c5813..c627098ed 100644 --- a/qutebrowser/mainwindow/prompt.py +++ b/qutebrowser/mainwindow/prompt.py @@ -27,8 +27,7 @@ import sip from PyQt5.QtCore import (pyqtSlot, pyqtSignal, Qt, QTimer, QDir, QModelIndex, QItemSelectionModel, QObject) from PyQt5.QtWidgets import (QWidget, QGridLayout, QVBoxLayout, QLineEdit, - QLabel, QWidgetItem, QFileSystemModel, QTreeView, - QSizePolicy) + QLabel, QFileSystemModel, QTreeView, QSizePolicy) from qutebrowser.config import style from qutebrowser.utils import usertypes, log, utils, qtutils, objreg, message @@ -82,7 +81,8 @@ class PromptQueue(QObject): _question: The current Question object if we're handling a question. Signals: - show_prompts: Emitted with a Question object when prompts should be shown. + show_prompts: Emitted with a Question object when prompts should be + shown. """ show_prompts = pyqtSignal(usertypes.Question) @@ -395,7 +395,6 @@ class PromptContainer(QWidget): pass - class LineEdit(QLineEdit): """A line edit used in prompts.""" @@ -774,6 +773,7 @@ class AlertPrompt(_BasePrompt): def init(): + """Initialize global prompt objects.""" global prompt_queue prompt_queue = PromptQueue() objreg.register('prompt-queue', prompt_queue) # for commands diff --git a/qutebrowser/utils/message.py b/qutebrowser/utils/message.py index 4e1250e77..62261f498 100644 --- a/qutebrowser/utils/message.py +++ b/qutebrowser/utils/message.py @@ -26,7 +26,7 @@ import traceback from PyQt5.QtCore import pyqtSignal, QObject -from qutebrowser.utils import usertypes, log, objreg, utils +from qutebrowser.utils import usertypes, log, utils def _log_stack(typ, stack):