diff --git a/app/helpers.py b/app/helpers.py index 7a97030..a59adc2 100644 --- a/app/helpers.py +++ b/app/helpers.py @@ -118,11 +118,8 @@ def get_embedded_time(text: str) -> Optional[dt.datetime]: def get_all_track_metadata(filepath: str) -> Dict[str, str | int | float]: """Return all track metadata""" - return ( - get_audio_metadata(filepath) - | get_tags(filepath) - | dict(path=filepath) - ) + return get_audio_metadata(filepath) | get_tags(filepath) | dict(path=filepath) + def get_audio_metadata(filepath: str) -> Dict[str, str | int | float]: """Return audio metadata""" diff --git a/app/musicmuster.py b/app/musicmuster.py index 822cacf..622086c 100755 --- a/app/musicmuster.py +++ b/app/musicmuster.py @@ -1320,7 +1320,9 @@ class Window(QMainWindow, Ui_MainWindow): width = Settings.get_setting(session, "mainwindow_width").f_int or 100 height = Settings.get_setting(session, "mainwindow_height").f_int or 100 splitter_top = Settings.get_setting(session, "splitter_top").f_int or 100 - splitter_bottom = Settings.get_setting(session, "splitter_bottom").f_int or 100 + splitter_bottom = ( + Settings.get_setting(session, "splitter_bottom").f_int or 100 + ) self.setGeometry(x, y, width, height) self.splitter.setSizes([splitter_top, splitter_bottom]) @@ -1619,9 +1621,7 @@ class SelectPlaylistDialog(QDialog): record = Settings.get_setting(self.session, "select_playlist_dialog_width") width = record.f_int or 800 - record = Settings.get_setting( - self.session, "select_playlist_dialog_height" - ) + record = Settings.get_setting(self.session, "select_playlist_dialog_height") height = record.f_int or 600 self.resize(width, height) @@ -1632,9 +1632,7 @@ class SelectPlaylistDialog(QDialog): self.ui.lstPlaylists.addItem(p) def __del__(self): # review - record = Settings.get_setting( - self.session, "select_playlist_dialog_height" - ) + record = Settings.get_setting(self.session, "select_playlist_dialog_height") record.f_int = self.height() record = Settings.get_setting(self.session, "select_playlist_dialog_width") diff --git a/tests/test_ui.py b/tests/test_ui.py index b4370e0..7ff1d2b 100644 --- a/tests/test_ui.py +++ b/tests/test_ui.py @@ -113,7 +113,9 @@ class MyTestCase(unittest.TestCase): model = playlistmodel.PlaylistModel(playlist.id) # Add a track with a note - model.insert_row(proposed_row_number=0, track_id=self.tracks[1]['id'], note=note_text) + model.insert_row( + proposed_row_number=0, track_id=self.tracks[1]["id"], note=note_text + ) # We need to commit the session before re-querying session.commit() @@ -124,7 +126,7 @@ class MyTestCase(unittest.TestCase): retrieved_playlist = all_playlists[0] assert len(retrieved_playlist.rows) == 1 paths = [a.track.path for a in retrieved_playlist.rows] - assert self.tracks[1]['path'] in paths + assert self.tracks[1]["path"] in paths notes = [a.note for a in retrieved_playlist.rows] assert note_text in notes