diff options
author | Florian Bruhin <me@the-compiler.org> | 2021-12-03 13:36:20 +0100 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2021-12-03 13:36:20 +0100 |
commit | 26d308d95d54abf68207d00002c0c1cd3d142ba4 (patch) | |
tree | d98cd827e2150b32cc4c5d4ddcad4ccae4e801c7 /qutebrowser | |
parent | 4435ef928796fa744be5452924a103bb2e58ee8e (diff) | |
download | qutebrowser-26d308d95d54abf68207d00002c0c1cd3d142ba4.tar.gz qutebrowser-26d308d95d54abf68207d00002c0c1cd3d142ba4.zip |
pylint: Enable docparams checker
Diffstat (limited to 'qutebrowser')
-rw-r--r-- | qutebrowser/browser/hints.py | 3 | ||||
-rw-r--r-- | qutebrowser/browser/navigate.py | 3 | ||||
-rw-r--r-- | qutebrowser/browser/webelem.py | 3 | ||||
-rw-r--r-- | qutebrowser/browser/webkit/webview.py | 9 | ||||
-rw-r--r-- | qutebrowser/commands/argparser.py | 2 | ||||
-rw-r--r-- | qutebrowser/completion/models/configmodel.py | 2 | ||||
-rw-r--r-- | qutebrowser/components/misccommands.py | 3 | ||||
-rw-r--r-- | qutebrowser/config/configcommands.py | 2 | ||||
-rw-r--r-- | qutebrowser/mainwindow/tabwidget.py | 1 | ||||
-rw-r--r-- | qutebrowser/misc/earlyinit.py | 2 | ||||
-rw-r--r-- | qutebrowser/misc/miscwidgets.py | 2 | ||||
-rw-r--r-- | qutebrowser/misc/sql.py | 3 | ||||
-rw-r--r-- | qutebrowser/utils/message.py | 3 | ||||
-rw-r--r-- | qutebrowser/utils/utils.py | 2 |
14 files changed, 12 insertions, 28 deletions
diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index 64062bbc6..2e4e8e4b4 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -299,7 +299,7 @@ class HintActions: Args: elem: The QWebElement to download. - _context: The HintContext to use. + context: The HintContext to use. """ url = elem.resolve_url(context.baseurl) if url is None: @@ -1154,7 +1154,6 @@ class WordHinter: from the words arg as fallback. Args: - words: Words to use as fallback when no link text can be used. elems: The elements to get hint strings for. Return: diff --git a/qutebrowser/browser/navigate.py b/qutebrowser/browser/navigate.py index 82bf57136..6217c8d00 100644 --- a/qutebrowser/browser/navigate.py +++ b/qutebrowser/browser/navigate.py @@ -92,9 +92,6 @@ def incdec(url, count, inc_or_dec): url: The current url. count: How much to increment or decrement by. inc_or_dec: Either 'increment' or 'decrement'. - tab: Whether to open the link in a new tab. - background: Open the link in a new background tab. - window: Open the link in a new window. """ urlutils.ensure_valid(url) segments: Optional[Set[str]] = ( diff --git a/qutebrowser/browser/webelem.py b/qutebrowser/browser/webelem.py index 7ebc7c69a..7dbd60782 100644 --- a/qutebrowser/browser/webelem.py +++ b/qutebrowser/browser/webelem.py @@ -160,9 +160,6 @@ class AbstractWebElement(collections.abc.MutableMapping): # type: ignore[type-a def is_content_editable(self) -> bool: """Check if an element has a contenteditable attribute. - Args: - elem: The QWebElement to check. - Return: True if the element has a contenteditable attribute, False otherwise. diff --git a/qutebrowser/browser/webkit/webview.py b/qutebrowser/browser/webkit/webview.py index 0242bed0c..289e29920 100644 --- a/qutebrowser/browser/webkit/webview.py +++ b/qutebrowser/browser/webkit/webview.py @@ -152,9 +152,6 @@ class WebView(QWebView): Args: e: The QPaintEvent. - - Return: - The superclass event return value. """ frame = self.page().mainFrame() new_pos = (frame.scrollBarValue(Qt.Horizontal), @@ -186,9 +183,6 @@ class WebView(QWebView): Args: e: The QShowEvent. - - Return: - The superclass event return value. """ super().showEvent(e) self.page().setVisibilityState(QWebPage.VisibilityStateVisible) @@ -198,9 +192,6 @@ class WebView(QWebView): Args: e: The QHideEvent. - - Return: - The superclass event return value. """ super().hideEvent(e) self.page().setVisibilityState(QWebPage.VisibilityStateHidden) diff --git a/qutebrowser/commands/argparser.py b/qutebrowser/commands/argparser.py index f8f083b72..2a11589f9 100644 --- a/qutebrowser/commands/argparser.py +++ b/qutebrowser/commands/argparser.py @@ -101,7 +101,7 @@ def type_conv(param, typ, value, *, str_choices=None): Args: param: The argparse.Parameter we're checking - types: The allowed type + typ: The allowed type value: The value to convert str_choices: The allowed choices if the type ends up being a string diff --git a/qutebrowser/completion/models/configmodel.py b/qutebrowser/completion/models/configmodel.py index 736d09644..abd0a817d 100644 --- a/qutebrowser/completion/models/configmodel.py +++ b/qutebrowser/completion/models/configmodel.py @@ -78,7 +78,7 @@ def value(optname, *values, info): Args: optname: The name of the config option this model shows. - values: The values already provided on the command line. + *values: The values already provided on the command line. info: A CompletionInfo instance. """ model = completionmodel.CompletionModel(column_widths=(30, 70, 0)) diff --git a/qutebrowser/components/misccommands.py b/qutebrowser/components/misccommands.py index 8eaae045f..fe908b7d2 100644 --- a/qutebrowser/components/misccommands.py +++ b/qutebrowser/components/misccommands.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see <https://www.gnu.org/licenses/>. +# To allow count being documented +# pylint: disable=differing-param-doc + """Various commands.""" import os diff --git a/qutebrowser/config/configcommands.py b/qutebrowser/config/configcommands.py index 62fc87f81..417ffce00 100644 --- a/qutebrowser/config/configcommands.py +++ b/qutebrowser/config/configcommands.py @@ -204,7 +204,7 @@ class ConfigCommands: Args: option: The name of the option. - values: The values to cycle through. + *values: The values to cycle through. pattern: The link:configuring{outfilesuffix}#patterns[URL pattern] to use. temp: Set value temporarily until qutebrowser is closed. print_: Print the value after setting. diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py index 7983127d5..07b1e5bef 100644 --- a/qutebrowser/mainwindow/tabwidget.py +++ b/qutebrowser/mainwindow/tabwidget.py @@ -486,7 +486,6 @@ class TabBar(QTabBar): Args: idx: The tab index to get the title for. - handle_unset: Whether to return an empty string on KeyError. """ try: return self.tab_data(idx, 'page-title') diff --git a/qutebrowser/misc/earlyinit.py b/qutebrowser/misc/earlyinit.py index 9dd1dc9a8..034d7ff74 100644 --- a/qutebrowser/misc/earlyinit.py +++ b/qutebrowser/misc/earlyinit.py @@ -109,7 +109,7 @@ def init_faulthandler(fileobj=sys.__stderr__): when sys.stderr got replaced, e.g. by "Python Tools for Visual Studio". Args: - fobj: An opened file object to write the traceback to. + fileobj: An opened file object to write the traceback to. """ try: faulthandler.enable(fileobj) diff --git a/qutebrowser/misc/miscwidgets.py b/qutebrowser/misc/miscwidgets.py index b89288fc7..4354ed2ab 100644 --- a/qutebrowser/misc/miscwidgets.py +++ b/qutebrowser/misc/miscwidgets.py @@ -213,7 +213,7 @@ class _FoldArrow(QWidget): """Paint the arrow. Args: - _paint: The QPaintEvent (unused). + _event: The QPaintEvent (unused). """ opt = QStyleOption() opt.initFrom(self) diff --git a/qutebrowser/misc/sql.py b/qutebrowser/misc/sql.py index 814eb2bb0..8f3282a2f 100644 --- a/qutebrowser/misc/sql.py +++ b/qutebrowser/misc/sql.py @@ -479,9 +479,6 @@ class SqlTable(QObject): Args: field: Field to use as the key. value: Key value to delete. - - Return: - The number of rows deleted. """ q = self.database.query(f"DELETE FROM {self._name} where {field} = :val") q.run(val=value) diff --git a/qutebrowser/utils/message.py b/qutebrowser/utils/message.py index 3097cb4dc..98e7d1c11 100644 --- a/qutebrowser/utils/message.py +++ b/qutebrowser/utils/message.py @@ -18,7 +18,8 @@ # along with qutebrowser. If not, see <https://www.gnu.org/licenses/>. # Because every method needs to have a log_stack argument -# pylint: disable=unused-argument +# and because we use *args a lot +# pylint: disable=unused-argument,differing-param-doc """Message singleton so we don't have to define unneeded signals.""" diff --git a/qutebrowser/utils/utils.py b/qutebrowser/utils/utils.py index 75da5028b..9c68932f3 100644 --- a/qutebrowser/utils/utils.py +++ b/qutebrowser/utils/utils.py @@ -382,7 +382,7 @@ def get_repr(obj: Any, constructor: bool = False, **attrs: Any) -> str: obj: The object to get a repr for. constructor: If True, show the Foo(one=1, two=2) form instead of <Foo one=1 two=2>. - attrs: The attributes to add. + **attrs: The attributes to add. """ cls = qualname(obj.__class__) parts = [] |