Skip to content

Commit

Permalink
fix some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
s-martin committed May 12, 2024
1 parent 85bdcdf commit a7a5846
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
4 changes: 1 addition & 3 deletions src/jukebox/components/jingle/jinglemp3/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""
Generic MP3 jingle Service for jingle.JingleFactory
"""
"""Generic MP3 jingle Service for jingle.JingleFactory"""
import logging
import subprocess
import jukebox.plugs as plugin
Expand Down
4 changes: 1 addition & 3 deletions src/jukebox/components/playermpd/playcontentcallback.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ class PlayCardState(Enum):


class PlayContentCallbacks(Generic[STATE], CallbackHandler):
"""
Callbacks are executed in various play functions
"""
"""Callbacks are executed in various play functions"""

def register(self, func: Callable[[str, STATE], None]):
"""
Expand Down
6 changes: 4 additions & 2 deletions src/jukebox/components/rfid/cardutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ def decode_card_command(cfg_rpc_cmd: Mapping, logger: logging.Logger = log):


def card_command_to_str(cfg_rpc_cmd: Mapping, long=False) -> List[str]:
"""Returns a list of strings with [card_action, ignore_same_id_delay, ignore_card_removal_action]
"""
Returns a list of strings with [card_action, ignore_same_id_delay, ignore_card_removal_action]
The last two parameters are only present, if *long* is True and if they are present in the cfg_rpc_cmd"""
The last two parameters are only present, if *long* is True and if they are present in the cfg_rpc_cmd
"""
action = decode_card_command(cfg_rpc_cmd)
readable = [utils.rpc_call_to_str(action)]
if long:
Expand Down
6 changes: 3 additions & 3 deletions src/jukebox/components/volume/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class SoundCardConnectCallbacks(CallbackHandler):
* new sound card gets connected
"""

def register(self, func: Callable[[str, str], None]):
"""
Add a new callback function :attr:`func`.
Expand Down Expand Up @@ -298,7 +298,7 @@ class OutputChangeCallbackHandler(CallbackHandler):
* audio sink is changed
"""

def register(self, func: Callable[[str, str, int, int], None]):
"""
Add a new callback function :attr:`func`.
Expand Down Expand Up @@ -330,7 +330,7 @@ class OutputVolumeCallbackHandler(CallbackHandler):
* audio volume level is changed
"""

def register(self, func: Callable[[int, bool, bool], None]):
"""
Add a new callback function :attr:`func`.
Expand Down

0 comments on commit a7a5846

Please sign in to comment.