Bump ruff from 0.2.2 to 0.3.3 (#1152)
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Fri, 22 Mar 2024 13:54:09 +0000 (14:54 +0100)
committerGitHub <noreply@github.com>
Fri, 22 Mar 2024 13:54:09 +0000 (14:54 +0100)
* Bump ruff from 0.2.2 to 0.3.3

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.2.2 to 0.3.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.2.2...v0.3.3)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
* run formatter

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
music_assistant/client/connection.py
music_assistant/common/models/provider.py
music_assistant/constants.py
music_assistant/server/helpers/logging.py
music_assistant/server/providers/airplay/__init__.py
music_assistant/server/providers/sonos/helpers.py
music_assistant/server/providers/spotify/__init__.py
pyproject.toml

index 4dfc9651ce6f6d281b729ba06a5cf0162fba8778..f3afb6aae14fc80267d455a592b1609dc9c872a2 100644 (file)
@@ -1,4 +1,4 @@
-""""Connect o a remote Music Assistant Server using the default Websocket API."""
+"""Connect o a remote Music Assistant Server using the default Websocket API."""
 
 from __future__ import annotations
 
index 404052a3b0c867bb60123b9df90cf4f9bafd58b6..27c428ea1ca78728fa9fe9a4c1393007f57e420c 100644 (file)
@@ -1,4 +1,5 @@
 """Models for providers and plugins in the MA ecosystem."""
+
 from __future__ import annotations
 
 import asyncio
index 04ac16a9f654190f8d36c8de075299c25b2623e0..680f73b676a7808c592542fa92de280215cb7816 100644 (file)
@@ -75,9 +75,9 @@ DB_TABLE_THUMBS: Final[str] = "thumbnails"
 DB_TABLE_PROVIDER_MAPPINGS: Final[str] = "provider_mappings"
 
 # all other
-MASS_LOGO_ONLINE: Final[
-    str
-] = "https://github.com/home-assistant/brands/raw/master/custom_integrations/mass/icon%402x.png"
+MASS_LOGO_ONLINE: Final[str] = (
+    "https://github.com/home-assistant/brands/raw/master/custom_integrations/mass/icon%402x.png"
+)
 ENCRYPT_SUFFIX = "_encrypted_"
 SECURE_STRING_SUBSTITUTE = "this_value_is_encrypted"
 CONFIGURABLE_CORE_CONTROLLERS = (
index fee87a63374a303627faf209bf976321cafd84d5..f48484e0a8838f2dbc6e11a0ad468f68154bb3c8 100644 (file)
@@ -109,15 +109,13 @@ def log_exception(format_err: Callable[..., Any], *args: Any) -> None:
 @overload
 def catch_log_exception(
     func: Callable[..., Coroutine[Any, Any, Any]], format_err: Callable[..., Any]
-) -> Callable[..., Coroutine[Any, Any, None]]:
-    ...
+) -> Callable[..., Coroutine[Any, Any, None]]: ...
 
 
 @overload
 def catch_log_exception(
     func: Callable[..., Any], format_err: Callable[..., Any]
-) -> Callable[..., None] | Callable[..., Coroutine[Any, Any, None]]:
-    ...
+) -> Callable[..., None] | Callable[..., Coroutine[Any, Any, None]]: ...
 
 
 def catch_log_exception(
index 89e9a5bdc2a58d09d393c7c3e86b0cbe21444621..8faafab8ab3d73fb97157ad9782e4a55747e851e 100644 (file)
@@ -1,4 +1,5 @@
 """Airplay Player provider for Music Assistant."""
+
 from __future__ import annotations
 
 import asyncio
index f8be90e78e05d2cf50630981e6e76d89cd0edf6e..4f458be303d94bac97727a6330ff494069ae484d 100644 (file)
@@ -35,15 +35,13 @@ class SonosUpdateError(PlayerCommandFailed):
 @overload
 def soco_error(
     errorcodes: None = ...,
-) -> Callable[[_FuncType[_T, _P, _R]], _FuncType[_T, _P, _R]]:
-    ...
+) -> Callable[[_FuncType[_T, _P, _R]], _FuncType[_T, _P, _R]]: ...
 
 
 @overload
 def soco_error(
     errorcodes: list[str],
-) -> Callable[[_FuncType[_T, _P, _R]], _ReturnFuncType[_T, _P, _R]]:
-    ...
+) -> Callable[[_FuncType[_T, _P, _R]], _ReturnFuncType[_T, _P, _R]]: ...
 
 
 def soco_error(
index b99f700f790b1a73d1e9b44202bc0b2a1002bd93..1d0c53039e0e17d80b8e68eba896cc7128f9ef80 100644 (file)
@@ -733,9 +733,12 @@ class SpotifyProvider(MusicProvider):
         if tokeninfo is None:
             tokeninfo = await self.login()
         headers = {"Authorization": f'Bearer {tokeninfo["accessToken"]}'}
-        async with self._throttler, self.mass.http_session.get(
-            url, headers=headers, params=kwargs, ssl=True, timeout=120
-        ) as response:
+        async with (
+            self._throttler,
+            self.mass.http_session.get(
+                url, headers=headers, params=kwargs, ssl=True, timeout=120
+            ) as response,
+        ):
             # handle spotify rate limiter
             if response.status == 429:
                 backoff_time = int(response.headers["Retry-After"])
index 45acec3cb984b59f1cbfa854ebf07fa2249965d7..bef03bf8fc14c6fb4da1c5edebc8d888206256ec 100644 (file)
@@ -53,7 +53,7 @@ test = [
   "pytest==8.1.1",
   "pytest-aiohttp==1.0.5",
   "pytest-cov==4.1.0",
-  "ruff==0.2.2",
+  "ruff==0.3.3",
   "safety==3.0.1",
 ]