Fix lint
This commit is contained in:
parent
5cfab728b2
commit
09f28f24c6
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue