diff options
author | Florian Bruhin <me@the-compiler.org> | 2021-12-02 17:51:46 +0100 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2021-12-02 17:54:38 +0100 |
commit | 49eddbe34c60599efbbd68d6704a6525628ff619 (patch) | |
tree | 80d09111c95de02682746565124d0083fb9d67af | |
parent | 100e87ff0e9e80ef517be2af757a6f875a15334f (diff) | |
download | qutebrowser-49eddbe34c60599efbbd68d6704a6525628ff619.tar.gz qutebrowser-49eddbe34c60599efbbd68d6704a6525628ff619.zip |
pylint: Work around used-before-assignment regression
See #6857 and https://github.com/PyCQA/pylint/issues/5342
-rw-r--r-- | qutebrowser/config/config.py | 2 | ||||
-rw-r--r-- | qutebrowser/config/configfiles.py | 2 | ||||
-rw-r--r-- | qutebrowser/config/configutils.py | 2 | ||||
-rw-r--r-- | qutebrowser/keyinput/basekeyparser.py | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/qutebrowser/config/config.py b/qutebrowser/config/config.py index 437a54a33..8c9f3a4d0 100644 --- a/qutebrowser/config/config.py +++ b/qutebrowser/config/config.py @@ -195,7 +195,7 @@ class KeyConfig: See #5942. """ - cmd_to_keys: KeyConfig._ReverseBindings = {} + cmd_to_keys: "KeyConfig._ReverseBindings" = {} bindings = self.get_bindings_for(mode) for seq, full_cmd in sorted(bindings.items()): for cmdtext in full_cmd.split(';;'): diff --git a/qutebrowser/config/configfiles.py b/qutebrowser/config/configfiles.py index 6f0d0b13c..89100ad52 100644 --- a/qutebrowser/config/configfiles.py +++ b/qutebrowser/config/configfiles.py @@ -70,7 +70,7 @@ class VersionChange(enum.Enum): This is intended to use filters like "major" (show major only), "minor" (show major/minor) or "patch" (show all changes). """ - allowed_values: Dict[str, List[VersionChange]] = { + allowed_values: Dict[str, List["VersionChange"]] = { 'major': [VersionChange.major], 'minor': [VersionChange.major, VersionChange.minor], 'patch': [VersionChange.major, VersionChange.minor, VersionChange.patch], diff --git a/qutebrowser/config/configutils.py b/qutebrowser/config/configutils.py index 480bbd85f..15f10b1ef 100644 --- a/qutebrowser/config/configutils.py +++ b/qutebrowser/config/configutils.py @@ -92,7 +92,7 @@ class Values: values: Sequence[ScopedValue] = ()) -> None: self.opt = opt self._vmap: MutableMapping[ - Values._VmapKeyType, ScopedValue] = collections.OrderedDict() + "Values._VmapKeyType", ScopedValue] = collections.OrderedDict() # A map from domain parts to rules that fall under them. self._domain_map: Dict[ Optional[str], Set[ScopedValue]] = collections.defaultdict(set) diff --git a/qutebrowser/keyinput/basekeyparser.py b/qutebrowser/keyinput/basekeyparser.py index 4db1d5d76..044c49278 100644 --- a/qutebrowser/keyinput/basekeyparser.py +++ b/qutebrowser/keyinput/basekeyparser.py @@ -75,7 +75,7 @@ class BindingTrie: __slots__ = 'children', 'command' def __init__(self) -> None: - self.children: MutableMapping[keyutils.KeyInfo, BindingTrie] = {} + self.children: MutableMapping[keyutils.KeyInfo, "BindingTrie"] = {} self.command: Optional[str] = None def __setitem__(self, sequence: keyutils.KeySequence, |