Skip to content

Commit

Permalink
pylint: Work around some minor false-positives
Browse files Browse the repository at this point in the history
See #6857
  • Loading branch information
The-Compiler committed Dec 3, 2021
1 parent 4d13280 commit 543390c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion qutebrowser/completion/completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class CompletionInfo:
"""Context passed into all completion functions."""

config: config.Config
keyconf: config.KeyConfig
keyconf: config.KeyConfig # pylint: disable=undefined-variable
win_id: int
cur_tab: 'browsertab.AbstractTab'

Expand Down
1 change: 1 addition & 0 deletions qutebrowser/misc/lineparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def _open(self, mode):
self._opened = True
try:
if self._binary:
# pylint: disable=unspecified-encoding
with open(self._configfile, mode + 'b') as f:
yield f
else:
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/mainwindow/statusbar/test_textbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ def test_text_elide_none(mocker, qtbot):
label = TextBase()
qtbot.add_widget(label)
label.setText('')
mocker.patch('qutebrowser.mainwindow.statusbar.textbase.TextBase.'
'fontMetrics')
mock = mocker.patch(
'qutebrowser.mainwindow.statusbar.textbase.TextBase.fontMetrics')
label._update_elided_text(20)

assert not label.fontMetrics.called
assert not mock.called


def test_unset_text(qtbot):
Expand Down

0 comments on commit 543390c

Please sign in to comment.