small optimization
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Sun, 25 Feb 2024 11:16:49 +0000 (12:16 +0100)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Sun, 25 Feb 2024 11:16:49 +0000 (12:16 +0100)
music_assistant/server/controllers/players.py
pyproject.toml

index 56ebaf0b73e62c76c9d83a35494bc7ead2e35de8..748a05b973a44e0417651dc9e2b6c463fd394490 100644 (file)
@@ -681,9 +681,8 @@ class PlayerController(CoreController):
             await self.cmd_stop(player_id)
         if player_id not in parent_player.can_sync_with:
             raise RuntimeError(
-                "Player %s can not be synced with %s",
-                child_player.display_name,
-                parent_player.display_name,
+                f"Player {child_player.display_name} can not "
+                f"be synced with {parent_player.display_name}",
             )
         # all checks passed, forward command to the player provider
         player_provider = self.get_player_provider(player_id)
index cf95f33a1a40ae7f77e93e511f83dc84f8a13dbe..2551e796556aa800ba0756f8e3e4b918583c2488 100644 (file)
@@ -187,6 +187,7 @@ ignore = [
   "D213", # Conflicts with other rules
   "D417", # False positives in some occasions
   "EM101", # Just annoying, not really useful
+  "EM102", # Just annoying, not really useful
   "FIX002", # Just annoying, not really useful
   "PLR2004", # Just annoying, not really useful
   "PD011", # Just annoying, not really useful