summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-03-21 17:56:48 +0100
committerFlorian Bruhin <me@the-compiler.org>2020-04-03 14:36:54 +0200
commit65b6660e8a4756b7febac748c93f1d3852453dad (patch)
tree96d48120b5f0d25388cfb6828f0abc30da030a01
parent50ed45d83900884e00906b580c62196ae65b2179 (diff)
downloadqutebrowser-65b6660e8a4756b7febac748c93f1d3852453dad.tar.gz
qutebrowser-65b6660e8a4756b7febac748c93f1d3852453dad.zip
Upgrade to mypy 0.770
This removes some isinstance asserts which are outdated. Mypy should be able to alert us in those cases anyways. (cherry picked from commit 3f8b9520c2c27d9efb484278925315bb9a0f029f)
-rw-r--r--misc/requirements/requirements-mypy.txt2
-rw-r--r--qutebrowser/keyinput/basekeyparser.py2
-rw-r--r--qutebrowser/utils/log.py2
3 files changed, 2 insertions, 4 deletions
diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt
index aa08cc2b7..243ec140b 100644
--- a/misc/requirements/requirements-mypy.txt
+++ b/misc/requirements/requirements-mypy.txt
@@ -1,6 +1,6 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
-mypy==0.761
+mypy==0.770
mypy-extensions==0.4.3
# PyQt5==5.11.3
# PyQt5-sip==4.19.19
diff --git a/qutebrowser/keyinput/basekeyparser.py b/qutebrowser/keyinput/basekeyparser.py
index 0f8ec421a..536a7e6ee 100644
--- a/qutebrowser/keyinput/basekeyparser.py
+++ b/qutebrowser/keyinput/basekeyparser.py
@@ -208,7 +208,6 @@ class BaseKeyParser(QObject):
- The found binding with Match.definitive.
"""
assert sequence
- assert not isinstance(sequence, str)
return self.bindings.matches(sequence)
def _match_without_modifiers(
@@ -340,7 +339,6 @@ class BaseKeyParser(QObject):
self.bindings = BindingTrie()
for key, cmd in config.key_instance.get_bindings_for(modename).items():
- assert not isinstance(key, str), key
assert cmd
self.bindings[key] = cmd
diff --git a/qutebrowser/utils/log.py b/qutebrowser/utils/log.py
index 30a399773..922981511 100644
--- a/qutebrowser/utils/log.py
+++ b/qutebrowser/utils/log.py
@@ -105,7 +105,7 @@ def vdebug(self: logging.Logger,
"""
if self.isEnabledFor(VDEBUG_LEVEL):
# pylint: disable=protected-access
- self._log(VDEBUG_LEVEL, msg, args, **kwargs) # type: ignore
+ self._log(VDEBUG_LEVEL, msg, args, **kwargs)
# pylint: enable=protected-access