Skip to content

Commit

Permalink
Upgrade to mypy 0.770
Browse files Browse the repository at this point in the history
This removes some isinstance asserts which are outdated. Mypy should be able to
alert us in those cases anyways.
  • Loading branch information
The-Compiler committed Mar 21, 2020
1 parent b2f48b5 commit 3f8b952
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion misc/requirements/requirements-mypy.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions qutebrowser/keyinput/basekeyparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ def _match_key(self, sequence: keyutils.KeySequence) -> MatchResult:
- The found binding with Match.definitive.
"""
assert sequence
assert not isinstance(sequence, str)
return self.bindings.matches(sequence)

def _match_without_modifiers(
Expand Down Expand Up @@ -340,7 +339,6 @@ def _read_config(self, modename: str = None) -> None:
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

Expand Down
2 changes: 1 addition & 1 deletion qutebrowser/utils/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 3f8b952

Please sign in to comment.