Using --fix of ruff and autoflake for the 2 remaining errors

ruff check --fix --select=UP007,UP045 qutebrowser tests
This commit is contained in:
killiandesse 2025-11-24 15:28:20 +01:00
parent 97a478c380
commit 9f69d06bc3
2 changed files with 4 additions and 4 deletions

View File

@ -36,7 +36,7 @@ import functools
import operator
import json
import dataclasses
from typing import Any, Optional, Union, TypeAlias
from typing import Any, Union, TypeAlias
from re import Pattern
from collections.abc import Iterable, Iterator, Sequence, Callable
@ -66,7 +66,7 @@ BOOLEAN_STATES = {'1': True, 'yes': True, 'true': True, 'on': True,
'0': False, 'no': False, 'false': False, 'off': False}
_Completions: TypeAlias = Optional[Iterable[tuple[str, str]]]
_Completions: TypeAlias = Iterable[tuple[str, str]] | None
_StrUnset: TypeAlias = str | usertypes.Unset
_UnsetNone: TypeAlias = None | usertypes.Unset
_StrUnsetNone: TypeAlias = str | _UnsetNone

View File

@ -9,7 +9,7 @@ import collections
import itertools
import operator
from typing import (
TYPE_CHECKING, Any, Optional, TypeAlias)
TYPE_CHECKING, Any, TypeAlias)
from collections.abc import Iterator, Sequence, MutableMapping
from qutebrowser.qt.core import QUrl
@ -69,7 +69,7 @@ class Values:
_domain_map: A mapping from hostnames to all associated ScopedValues.
"""
_VmapKeyType: TypeAlias = Optional[urlmatch.UrlPattern]
_VmapKeyType: TypeAlias = urlmatch.UrlPattern | None
def __init__(self,
opt: 'configdata.Option',