This commit is contained in:
Florian Bruhin 2023-07-20 12:42:29 +02:00
parent 5cfab728b2
commit 09f28f24c6
5 changed files with 6 additions and 5 deletions

View File

@ -294,7 +294,7 @@ class AbstractPrinting(QObject):
def show_dialog(self) -> None:
"""Print with a QPrintDialog."""
self._dialog = dialog = QPrintDialog(self._tab)
self._dialog = QPrintDialog(self._tab)
self._dialog.open(self._do_print)
# Gets cleaned up in on_printing_finished

View File

@ -201,10 +201,10 @@ def simple_split(s, keep=False, maxsplit=None):
if keep:
pattern = '([' + whitespace + '])'
parts = re.split(pattern, s, maxsplit)
parts = re.split(pattern, s, maxsplit=maxsplit)
return _combine_ws(parts, whitespace)
else:
pattern = '[' + whitespace + ']'
parts = re.split(pattern, s, maxsplit)
parts = re.split(pattern, s, maxsplit=maxsplit)
parts[-1] = parts[-1].rstrip()
return [p for p in parts if p]

View File

@ -255,7 +255,7 @@ def disable_qt_msghandler() -> Iterator[None]:
@contextlib.contextmanager
def py_warning_filter(
def py_warning_filter(
action:
Literal['default', 'error', 'ignore', 'always', 'module', 'once'] = 'ignore',
**kwargs: Any,

View File

@ -651,6 +651,7 @@ def extract_enum_val(val: Union[sip.simplewrapper, int, enum.Enum]) -> int:
return int(val) # type: ignore[call-overload]
return val
_T = TypeVar("_T")

View File

@ -32,7 +32,7 @@ import getpass
import functools
import dataclasses
import importlib.metadata
from typing import (Mapping, Optional, Sequence, Tuple, ClassVar, Dict, cast, Any,
from typing import (Mapping, Optional, Sequence, Tuple, ClassVar, Dict, Any,
TYPE_CHECKING)
from qutebrowser.qt import machinery