From 20042dd3b1bfc76a56dc54b84b2f093a5c77d379 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 15:33:01 +0200 Subject: [PATCH] Bump ruff from 0.3.7 to 0.4.3 (#1273) * Bump ruff from 0.3.7 to 0.4.3 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.3.7 to 0.4.3. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.3.7...v0.4.3) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * lint --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marcel van der Veldt --- music_assistant/server/helpers/api.py | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/music_assistant/server/helpers/api.py b/music_assistant/server/helpers/api.py index c0bf9345..0b24b5cc 100644 --- a/music_assistant/server/helpers/api.py +++ b/music_assistant/server/helpers/api.py @@ -62,7 +62,7 @@ def parse_arguments( if strict: for key, value in args.items(): if key not in func_sig.parameters: - raise KeyError("Invalid parameter: '%s'" % key) + raise KeyError(f"Invalid parameter: '{key}'") # parse arguments to correct type for name, param in func_sig.parameters.items(): value = args.get(name) @@ -125,7 +125,7 @@ def parse_value(name: str, value: Any, value_type: Any, default: Any = MISSING) # raise exception, we have no idea how to handle this value raise TypeError(err) # failed to parse the (sub) value but None allowed, log only - logging.getLogger(__name__).warn(err) + logging.getLogger(__name__).warning(err) return None if origin is type: return eval(value) # pylint: disable=eval-used diff --git a/pyproject.toml b/pyproject.toml index e34d2e16..45f5c829 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ test = [ "pytest==8.2.0", "pytest-aiohttp==1.0.5", "pytest-cov==5.0.0", - "ruff==0.3.7", + "ruff==0.4.3", ] [project.scripts] -- 2.34.1