diff --git a/picard/util/filenaming.py b/picard/util/filenaming.py index 11e4c28b4e5..6f5ae72fa47 100644 --- a/picard/util/filenaming.py +++ b/picard/util/filenaming.py @@ -60,7 +60,7 @@ import pywintypes import win32api except ImportError as e: - log.warning('pywin32 not available: %s', e) + log.warning("pywin32 not available: %s", e) def _get_utf16_length(text): diff --git a/picard/util/imageinfo.py b/picard/util/imageinfo.py index 4795e74f5f6..2fc20814fce 100644 --- a/picard/util/imageinfo.py +++ b/picard/util/imageinfo.py @@ -53,7 +53,7 @@ def __init__(self, data): self.data = data self.datalen = len(self.data) if self.datalen < 16: - raise NotEnoughData('Not enough data') + raise NotEnoughData("Not enough data") def read(self): self._read() @@ -176,7 +176,7 @@ def _read(self): index = data.find(b'\x9d\x01\x2a') if index != -1: if self.datalen < index + 7: - raise NotEnoughData('Not enough data for WebP VP8') + raise NotEnoughData("Not enough data for WebP VP8") self.w, self.h = struct.unpack(' str: self.__create_pipe() if message is not None: - message = message.decode("utf-8") + message = message.decode('utf-8') if exit_code == 0: return message # type: ignore else: diff --git a/picard/util/remotecommands.py b/picard/util/remotecommands.py index b61ac47f0d8..4c9112b0ae5 100644 --- a/picard/util/remotecommands.py +++ b/picard/util/remotecommands.py @@ -36,93 +36,93 @@ def __init__(self, method_name, help_text=None, help_args=None): REMOTE_COMMANDS = { - "CLEAR_LOGS": RemoteCommand( - "handle_command_clear_logs", + 'CLEAR_LOGS': RemoteCommand( + 'handle_command_clear_logs', help_text="Clear the Picard logs", ), - "CLUSTER": RemoteCommand( - "handle_command_cluster", + 'CLUSTER': RemoteCommand( + 'handle_command_cluster', help_text="Cluster all files in the cluster pane.", ), - "FINGERPRINT": RemoteCommand( - "handle_command_fingerprint", + 'FINGERPRINT': RemoteCommand( + 'handle_command_fingerprint', help_text="Calculate acoustic fingerprints for all (matched) files in the album pane.", ), - "FROM_FILE": RemoteCommand( - "handle_command_from_file", + 'FROM_FILE': RemoteCommand( + 'handle_command_from_file', help_text="Load commands from a file.", help_args="[Path to a file containing commands]", ), - "LOAD": RemoteCommand( - "handle_command_load", + 'LOAD': RemoteCommand( + 'handle_command_load', help_text="Load one or more files/MBIDs/URLs to Picard.", help_args="[supported MBID/URL or path to a file]", ), - "LOOKUP": RemoteCommand( - "handle_command_lookup", + 'LOOKUP': RemoteCommand( + 'handle_command_lookup', help_text="Lookup files in the clustering pane. Defaults to all files.", help_args="[clustered|unclustered|all]" ), - "LOOKUP_CD": RemoteCommand( - "handle_command_lookup_cd", + 'LOOKUP_CD': RemoteCommand( + 'handle_command_lookup_cd', help_text="Read CD from the selected drive and lookup on MusicBrainz. " "Without argument, it defaults to the first (alphabetically) available disc drive.", help_args="[device/log file]", ), - "PAUSE": RemoteCommand( - "handle_command_pause", + 'PAUSE': RemoteCommand( + 'handle_command_pause', help_text="Pause executable command processing.", help_args="[number of seconds to pause]", ), - "QUIT": RemoteCommand( - "handle_command_quit", + 'QUIT': RemoteCommand( + 'handle_command_quit', help_text="Exit the running instance of Picard. " "Use the argument 'FORCE' to bypass Picard's unsaved files check.", help_args="[FORCE]", ), - "REMOVE": RemoteCommand( - "handle_command_remove", + 'REMOVE': RemoteCommand( + 'handle_command_remove', help_text="Remove the file from Picard. Do nothing if no arguments provided.", help_args="[absolute path to one or more files]", ), - "REMOVE_ALL": RemoteCommand( - "handle_command_remove_all", + 'REMOVE_ALL': RemoteCommand( + 'handle_command_remove_all', help_text="Remove all files from Picard.", ), - "REMOVE_EMPTY": RemoteCommand( - "handle_command_remove_empty", + 'REMOVE_EMPTY': RemoteCommand( + 'handle_command_remove_empty', help_text="Remove all empty clusters and albums.", ), - "REMOVE_SAVED": RemoteCommand( - "handle_command_remove_saved", + 'REMOVE_SAVED': RemoteCommand( + 'handle_command_remove_saved', help_text="Remove all saved files from the album pane.", ), - "REMOVE_UNCLUSTERED": RemoteCommand( - "handle_command_remove_unclustered", + 'REMOVE_UNCLUSTERED': RemoteCommand( + 'handle_command_remove_unclustered', help_text="Remove all unclustered files from the cluster pane.", ), - "SAVE_MATCHED": RemoteCommand( - "handle_command_save_matched", + 'SAVE_MATCHED': RemoteCommand( + 'handle_command_save_matched', help_text="Save all matched files from the album pane." ), - "SAVE_MODIFIED": RemoteCommand( - "handle_command_save_modified", + 'SAVE_MODIFIED': RemoteCommand( + 'handle_command_save_modified', help_text="Save all modified files from the album pane.", ), - "SCAN": RemoteCommand( - "handle_command_scan", + 'SCAN': RemoteCommand( + 'handle_command_scan', help_text="Scan all files in the cluster pane.", ), - "SHOW": RemoteCommand( - "handle_command_show", + 'SHOW': RemoteCommand( + 'handle_command_show', help_text="Make the running instance the currently active window.", ), - "SUBMIT_FINGERPRINTS": RemoteCommand( - "handle_command_submit_fingerprints", + 'SUBMIT_FINGERPRINTS': RemoteCommand( + 'handle_command_submit_fingerprints', help_text="Submit outstanding acoustic fingerprints for all (matched) files in the album pane.", ), - "WRITE_LOGS": RemoteCommand( - "handle_command_write_logs", + 'WRITE_LOGS': RemoteCommand( + 'handle_command_write_logs', help_text="Write Picard logs to a given path.", help_args="[absolute path to one file]", ),