summaryrefslogtreecommitdiff
path: root/qutebrowser/utils/log.py
diff options
context:
space:
mode:
Diffstat (limited to 'qutebrowser/utils/log.py')
-rw-r--r--qutebrowser/utils/log.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/qutebrowser/utils/log.py b/qutebrowser/utils/log.py
index 6677e383e..4853d62ae 100644
--- a/qutebrowser/utils/log.py
+++ b/qutebrowser/utils/log.py
@@ -247,7 +247,9 @@ def disable_qt_msghandler() -> Iterator[None]:
@contextlib.contextmanager
def py_warning_filter(action: str = 'ignore', **kwargs: Any) -> Iterator[None]:
"""Contextmanager to temporarily disable certain Python warnings."""
- warnings.filterwarnings(action, **kwargs)
+ # FIXME Use Literal['default', 'error', 'ignore', 'always', 'module', 'once']
+ # once we use Python 3.8 or typing_extensions
+ warnings.filterwarnings(action, **kwargs) # type: ignore[arg-type]
yield
if _log_inited:
_init_py_warnings()
@@ -729,8 +731,8 @@ class ColoredFormatter(logging.Formatter):
datefmt: str,
style: str, *,
use_colors: bool) -> None:
- super().__init__(fmt, datefmt, style) # type: ignore[arg-type]
# FIXME Use Literal["%", "{", "$"] once we use Python 3.8 or typing_extensions
+ super().__init__(fmt, datefmt, style) # type: ignore[arg-type]
self.use_colors = use_colors
def format(self, record: logging.LogRecord) -> str: