tools: bump ruff to 0.2.2 and fix issues

This commit is contained in:
bastimeyer 2024-02-18 14:40:38 +01:00 committed by Sebastian Meyer
parent 7765408caf
commit 8295cd2978
6 changed files with 3 additions and 6 deletions

View File

@ -15,7 +15,7 @@ pytest-cov
coverage[toml]
# code-linting
ruff ==0.2.1
ruff ==0.2.2
# typing
mypy ==1.8.0

View File

@ -238,7 +238,7 @@ ignore = [
"src/streamlink/_version.py" = ["I"]
"src/streamlink/plugin/api/useragents.py" = ["E501"]
"src/streamlink/plugins/*" = ["RUF012"]
"src/streamlink/webbrowser/cdp/devtools/*" = ["E501", "F401"]
"src/streamlink/webbrowser/cdp/devtools/*" = ["E303", "E501", "F401"]
"src/streamlink_cli/main.py" = ["PLW0603"]
"tests/**" = ["RUF012"]

View File

@ -106,7 +106,6 @@ class TestPlayerArgs:
def test_input(self):
pass
@pytest.mark.parametrize(("playerpath", "playerargsclass"), [
pytest.param(
"player",

View File

@ -40,7 +40,6 @@ class TestFindDefaultPlayer:
assert find_default_player() == expected
assert which.call_args_list == [call(path) for path in lookups]
@pytest.mark.windows_only()
@pytest.mark.parametrize("_environ", [{
"PROGRAMFILES": "C:\\Program Files",

View File

@ -5,9 +5,7 @@ from tests.plugins import PluginCanHandleUrl
class TestPluginCanHandleUrlWWENetwork(PluginCanHandleUrl):
__plugin__ = WWENetwork
should_match_groups = [
("https://network.wwe.com/video/3622", {"stream_id": "3622"}),
("https://network.wwe.com/live/3622", {"stream_id": "3622"}),
]

View File

@ -12,6 +12,7 @@ RESOLVE_EXECUTABLE_LOOKUPS = {
"/other/bar": "/other/bar",
}
@pytest.mark.parametrize(("custom", "names", "fallbacks", "expected"), [
pytest.param(
None,