mirror of https://github.com/streamlink/streamlink
tools: bump ruff to 0.1.14 and fix issues
This commit is contained in:
parent
24435cb8a3
commit
61a4f33905
|
@ -15,7 +15,7 @@ pytest-cov
|
|||
coverage[toml]
|
||||
|
||||
# code-linting
|
||||
ruff ==0.1.13
|
||||
ruff ==0.1.14
|
||||
|
||||
# typing
|
||||
mypy ==1.8.0
|
||||
|
|
|
@ -215,6 +215,7 @@ extend-ignore = [
|
|||
"PLC2801", # unnecessary-dunder-call
|
||||
"PLW2901", # redefined-loop-name
|
||||
"RUF021", # parenthesize-chained-operators
|
||||
"RUF022", # unsorted-dunder-all
|
||||
]
|
||||
extend-exclude = [
|
||||
"docs/conf.py",
|
||||
|
|
|
@ -17,7 +17,7 @@ detect_encoding = charset_normalizer.detect
|
|||
|
||||
|
||||
__all__ = [
|
||||
"detect_encoding",
|
||||
"is_darwin",
|
||||
"is_win32",
|
||||
"detect_encoding",
|
||||
]
|
||||
|
|
|
@ -265,4 +265,8 @@ class Arguments:
|
|||
yield r
|
||||
|
||||
|
||||
__all__ = ["Options", "Arguments", "Argument"]
|
||||
__all__ = [
|
||||
"Argument",
|
||||
"Arguments",
|
||||
"Options",
|
||||
]
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
from collections.abc import Callable, Iterable, Mapping, MutableMapping, Sequence
|
||||
from typing import Any, Union
|
||||
|
||||
from _typeshed import SupportsItems, SupportsRead
|
||||
# noinspection PyUnresolvedReferences
|
||||
from _typeshed import SupportsItems, SupportsRead # noqa: PLC2701
|
||||
from requests import PreparedRequest, Response, Session
|
||||
from requests.adapters import HTTPAdapter
|
||||
from requests.auth import AuthBase
|
||||
|
|
|
@ -17,6 +17,6 @@ class DeprecatedPath(_BasePath):
|
|||
|
||||
|
||||
__all__ = [
|
||||
"stdout",
|
||||
"DeprecatedPath",
|
||||
"stdout",
|
||||
]
|
||||
|
|
|
@ -60,6 +60,10 @@ STREAM_PASSTHROUGH = ["hls", "http"]
|
|||
|
||||
|
||||
__all__ = [
|
||||
"CONFIG_FILES",
|
||||
"DEFAULT_STREAM_METADATA",
|
||||
"CONFIG_FILES", "PLUGIN_DIRS", "LOG_DIR", "STREAM_SYNONYMS", "STREAM_PASSTHROUGH",
|
||||
"LOG_DIR",
|
||||
"PLUGIN_DIRS",
|
||||
"STREAM_PASSTHROUGH",
|
||||
"STREAM_SYNONYMS",
|
||||
]
|
||||
|
|
|
@ -8,7 +8,7 @@ from streamlink.exceptions import PluginError
|
|||
from streamlink.plugin.api import validate
|
||||
|
||||
# noinspection PyProtectedMember
|
||||
from streamlink.plugin.api.validate._exception import ValidationError
|
||||
from streamlink.plugin.api.validate._exception import ValidationError # noqa: PLC2701
|
||||
|
||||
|
||||
def assert_validationerror(exception, expected):
|
||||
|
|
|
@ -23,7 +23,13 @@ from streamlink.plugin import (
|
|||
)
|
||||
|
||||
# noinspection PyProtectedMember
|
||||
from streamlink.plugin.plugin import _COOKIE_KEYS, _PLUGINARGUMENT_TYPE_REGISTRY, Matcher, parse_params, stream_weight
|
||||
from streamlink.plugin.plugin import (
|
||||
_COOKIE_KEYS, # noqa: PLC2701
|
||||
_PLUGINARGUMENT_TYPE_REGISTRY, # noqa: PLC2701
|
||||
Matcher,
|
||||
parse_params,
|
||||
stream_weight,
|
||||
)
|
||||
from streamlink.session import Streamlink
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue