From bbb44f6e5056ab31f945ec7fb48106c40559a836 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 3 Dec 2021 13:48:40 +0100 Subject: Add some missing docstring params --- qutebrowser/browser/browsertab.py | 1 + qutebrowser/browser/commands.py | 1 + qutebrowser/browser/greasemonkey.py | 1 + qutebrowser/browser/history.py | 1 + qutebrowser/browser/qtnetworkdownloads.py | 4 ++++ qutebrowser/browser/webelem.py | 1 + qutebrowser/completion/models/completionmodel.py | 1 + qutebrowser/completion/models/configmodel.py | 1 + qutebrowser/config/config.py | 2 ++ qutebrowser/misc/keyhintwidget.py | 1 + qutebrowser/misc/msgbox.py | 1 + qutebrowser/misc/savemanager.py | 1 + qutebrowser/misc/split.py | 1 + qutebrowser/utils/log.py | 4 ++-- qutebrowser/utils/message.py | 2 +- qutebrowser/utils/urlutils.py | 1 + scripts/dev/build_release.py | 1 + 17 files changed, 22 insertions(+), 3 deletions(-) diff --git a/qutebrowser/browser/browsertab.py b/qutebrowser/browser/browsertab.py index b1827dbf4..661c5f68b 100644 --- a/qutebrowser/browser/browsertab.py +++ b/qutebrowser/browser/browsertab.py @@ -779,6 +779,7 @@ class AbstractAudio(QObject): """Set this tab as muted or not. Arguments: + muted: Whether the tab is currently muted. override: If set to True, muting/unmuting was done manually and overrides future automatic mute/unmute changes based on the URL. diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index dc9290b0e..395d8e8a4 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -1521,6 +1521,7 @@ class CommandDispatcher: Callback for GUIProcess when the edited text was updated. Args: + ed: The editor.ExternalEditor instance elem: The WebElementWrapper which was modified. text: The new text to insert. """ diff --git a/qutebrowser/browser/greasemonkey.py b/qutebrowser/browser/greasemonkey.py index d0245937f..5abb9a137 100644 --- a/qutebrowser/browser/greasemonkey.py +++ b/qutebrowser/browser/greasemonkey.py @@ -324,6 +324,7 @@ class GreasemonkeyManager(QObject): """Add a GreasemonkeyScript to this manager. Args: + script: The GreasemonkeyScript to add. force: Fetch and overwrite any dependencies which are already locally cached. """ diff --git a/qutebrowser/browser/history.py b/qutebrowser/browser/history.py index 559992327..d2046345f 100644 --- a/qutebrowser/browser/history.py +++ b/qutebrowser/browser/history.py @@ -405,6 +405,7 @@ class WebHistory(sql.SqlTable): Args: url: A url (as QUrl) to add to the history. + title: The tab title to add. redirect: Whether the entry was redirected to another URL (hidden in completion) atime: Override the atime used to add the entry diff --git a/qutebrowser/browser/qtnetworkdownloads.py b/qutebrowser/browser/qtnetworkdownloads.py index 82ed94380..8adb7ea20 100644 --- a/qutebrowser/browser/qtnetworkdownloads.py +++ b/qutebrowser/browser/qtnetworkdownloads.py @@ -503,6 +503,7 @@ class DownloadManager(downloads.AbstractDownloadManager): Args: request: The QNetworkRequest to download. target: Where to save the download as downloads.DownloadTarget. + suggested_fn: The filename to use for the file. **kwargs: Passed to _fetch_request. Return: @@ -547,6 +548,9 @@ class DownloadManager(downloads.AbstractDownloadManager): target: Where to save the download as downloads.DownloadTarget. auto_remove: Whether to remove the download even if downloads.remove_finished is set to -1. + suggested_filename: The filename to use for the file. + prompt_download_directory: Whether to prompt for a location to + download the file to. Return: The created DownloadItem. diff --git a/qutebrowser/browser/webelem.py b/qutebrowser/browser/webelem.py index 7dbd60782..05b0eadb3 100644 --- a/qutebrowser/browser/webelem.py +++ b/qutebrowser/browser/webelem.py @@ -132,6 +132,7 @@ class AbstractWebElement(collections.abc.MutableMapping): # type: ignore[type-a """Dispatch an event to the element. Args: + event: The name of the event. bubbles: Whether this event should bubble. cancelable: Whether this event can be cancelled. composed: Whether the event will trigger listeners outside of a diff --git a/qutebrowser/completion/models/completionmodel.py b/qutebrowser/completion/models/completionmodel.py index 81f4bba8e..236b25533 100644 --- a/qutebrowser/completion/models/completionmodel.py +++ b/qutebrowser/completion/models/completionmodel.py @@ -70,6 +70,7 @@ class CompletionModel(QAbstractItemModel): Args: index: The QModelIndex to get item flags for. + role: The Qt ItemRole to get the data for. Return: The item data, or None on an invalid index. """ diff --git a/qutebrowser/completion/models/configmodel.py b/qutebrowser/completion/models/configmodel.py index abd0a817d..7c8473b3f 100644 --- a/qutebrowser/completion/models/configmodel.py +++ b/qutebrowser/completion/models/configmodel.py @@ -137,6 +137,7 @@ def bind(key, *, info): Args: key: the key being bound. + info: A CompletionInfo instance. """ model = completionmodel.CompletionModel(column_widths=(20, 60, 20)) data = _bind_current_default(key, info) diff --git a/qutebrowser/config/config.py b/qutebrowser/config/config.py index 8c9f3a4d0..e054c8010 100644 --- a/qutebrowser/config/config.py +++ b/qutebrowser/config/config.py @@ -387,6 +387,8 @@ class Config(QObject): """Get the given setting converted for Python code. Args: + name: The name of the setting to get. + url: The URL to get the value for. fallback: Use the global value if there's no URL-specific one. """ opt = self.get_opt(name) diff --git a/qutebrowser/misc/keyhintwidget.py b/qutebrowser/misc/keyhintwidget.py index 4fcef72e4..93d9af09d 100644 --- a/qutebrowser/misc/keyhintwidget.py +++ b/qutebrowser/misc/keyhintwidget.py @@ -87,6 +87,7 @@ class KeyHintView(QLabel): """Show hints for the given prefix (or hide if prefix is empty). Args: + mode: The key mode to show the keyhints for. prefix: The current partial keystring. """ match = re.fullmatch(r'(\d*)(.*)', prefix) diff --git a/qutebrowser/misc/msgbox.py b/qutebrowser/misc/msgbox.py index 9d5fbf601..4271c2639 100644 --- a/qutebrowser/misc/msgbox.py +++ b/qutebrowser/misc/msgbox.py @@ -42,6 +42,7 @@ def msgbox(parent, title, text, *, icon, buttons=QMessageBox.Ok, parent: The parent to set for the message box. title: The title to set. text: The text to set. + icon: The QIcon to show in the box. buttons: The buttons to set (QMessageBox::StandardButtons) on_finished: A slot to connect to the 'finished' signal. plain_text: Whether to force plain text (True) or rich text (False). diff --git a/qutebrowser/misc/savemanager.py b/qutebrowser/misc/savemanager.py index ee22ba14d..1b72734cb 100644 --- a/qutebrowser/misc/savemanager.py +++ b/qutebrowser/misc/savemanager.py @@ -157,6 +157,7 @@ class SaveManager(QObject): """Save a saveable by name. Args: + name: The name of the saveable to save. is_exit: Whether we're currently exiting qutebrowser. explicit: Whether this save operation was triggered explicitly. silent: Don't write information to log. Used to reduce log spam diff --git a/qutebrowser/misc/split.py b/qutebrowser/misc/split.py index 4db91360e..c7d93e76d 100644 --- a/qutebrowser/misc/split.py +++ b/qutebrowser/misc/split.py @@ -128,6 +128,7 @@ def split(s, keep=False): """Split a string via ShellLexer. Args: + s: The string to split. keep: Whether to keep special chars in the split output. """ lexer = ShellLexer(s) diff --git a/qutebrowser/utils/log.py b/qutebrowser/utils/log.py index 9cd07e2e3..54ca4029b 100644 --- a/qutebrowser/utils/log.py +++ b/qutebrowser/utils/log.py @@ -381,8 +381,8 @@ def qt_message_handler(msg_type: QtCore.QtMsgType, """Qt message handler to redirect qWarning etc. to the logging system. Args: - QtMsgType msg_type: The level of the message. - QMessageLogContext context: The source code location of the message. + msg_type: The level of the message. + context: The source code location of the message. msg: The message text. """ # Mapping from Qt logging levels to the matching logging module levels. diff --git a/qutebrowser/utils/message.py b/qutebrowser/utils/message.py index 98e7d1c11..c490aa4e8 100644 --- a/qutebrowser/utils/message.py +++ b/qutebrowser/utils/message.py @@ -140,7 +140,7 @@ def ask_async(title: str, """Ask an async question in the statusbar. Args: - message: The message to display to the user. + title: The message to display to the user. mode: A PromptMode. handler: The function to get called with the answer as argument. default: The default value to display. diff --git a/qutebrowser/utils/urlutils.py b/qutebrowser/utils/urlutils.py index 68520a706..cfba2c1d8 100644 --- a/qutebrowser/utils/urlutils.py +++ b/qutebrowser/utils/urlutils.py @@ -329,6 +329,7 @@ def invalid_url_error(url: QUrl, action: str) -> None: """Display an error message for a URL. Args: + url: The URL to display a message for. action: The action which was interrupted by the error. """ if url.isValid(): diff --git a/scripts/dev/build_release.py b/scripts/dev/build_release.py index 241d27f1d..2b3aff4b4 100755 --- a/scripts/dev/build_release.py +++ b/scripts/dev/build_release.py @@ -550,6 +550,7 @@ def github_upload(artifacts, tag, gh_token): Args: artifacts: A list of (filename, mimetype, description) tuples tag: The name of the release tag + gh_token: The GitHub token to use """ import github3 import github3.exceptions -- cgit v1.2.3-54-g00ecf