diff options
author | Florian Bruhin <me@the-compiler.org> | 2023-06-30 00:49:30 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2023-06-30 00:49:30 +0200 |
commit | 904cab911d664b92cfb2abb5f569a3a35ca39e29 (patch) | |
tree | 4ed2bef94817c45ae69d2126defb5eaaa5a20dba /qutebrowser | |
parent | a6d42275781c45f2f050dd72d2f0f7615502381b (diff) | |
download | qutebrowser-904cab911d664b92cfb2abb5f569a3a35ca39e29.tar.gz qutebrowser-904cab911d664b92cfb2abb5f569a3a35ca39e29.zip |
mypy: Install more typeshed types
Diffstat (limited to 'qutebrowser')
-rw-r--r-- | qutebrowser/utils/log.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qutebrowser/utils/log.py b/qutebrowser/utils/log.py index 040e75f16..f3363e8a2 100644 --- a/qutebrowser/utils/log.py +++ b/qutebrowser/utils/log.py @@ -33,14 +33,14 @@ import json import inspect import argparse from typing import (TYPE_CHECKING, Any, Iterator, Mapping, MutableSequence, - Optional, Set, Tuple, Union) + Optional, Set, Tuple, Union, TextIO, cast) from qutebrowser.qt import core as qtcore # Optional imports try: import colorama except ImportError: - colorama = None + colorama = None # type: ignore[assignment] if TYPE_CHECKING: from qutebrowser.config import config as configmodule @@ -279,7 +279,7 @@ def _init_handlers( else: strip = False if force_color else None if use_colorama: - stream = colorama.AnsiToWin32(sys.stderr, strip=strip) + stream = cast(TextIO, colorama.AnsiToWin32(sys.stderr, strip=strip)) else: stream = sys.stderr console_handler = logging.StreamHandler(stream) |