ran linter

This commit is contained in:
Frank 2022-04-29 11:10:51 -04:00
parent e5a5e0d527
commit e3c4e05f44
3 changed files with 11 additions and 7 deletions

View file

@ -33,7 +33,6 @@ class SoundcloudAlbumTrack(SoundcloudTrack):
album_year: int, album_year: int,
total_tracks: int, total_tracks: int,
playlist_metadata: PlaylistMetadata, playlist_metadata: PlaylistMetadata,
): ):
""" """
Initialize the album track using album metadata and ytdl metadata for the specific track. Initialize the album track using album metadata and ytdl metadata for the specific track.
@ -113,7 +112,7 @@ class SoundcloudAlbum(Entry):
album=self.title, album=self.title,
album_year=self.album_year, album_year=self.album_year,
soundcloud_track=track, soundcloud_track=track,
total_tracks = self.track_count, total_tracks=self.track_count,
playlist_metadata=PlaylistMetadata( playlist_metadata=PlaylistMetadata(
playlist_id=self.uid, playlist_id=self.uid,
playlist_extractor=self.extractor, playlist_extractor=self.extractor,

View file

@ -34,7 +34,8 @@ class SoundcloudVariables(EntryVariables):
""" """
if self.kwargs_contains("total_tracks"): if self.kwargs_contains("total_tracks"):
return self.kwargs("total_tracks") return self.kwargs("total_tracks")
return 1 #i.e. single does not contain total_tracks return 1 # i.e. single does not contain total_tracks
@property @property
def album(self) -> str: def album(self) -> str:
""" """

View file

@ -12,10 +12,12 @@ def track_number():
def track_number_padded(): def track_number_padded():
return "01" return "01"
@pytest.fixture @pytest.fixture
def track_count(): def track_count():
return 1 return 1
@pytest.fixture @pytest.fixture
def url(): def url():
return "soundcloud.com/artist/track-asdfasdf" return "soundcloud.com/artist/track-asdfasdf"
@ -25,10 +27,12 @@ def url():
def is_premiere(): def is_premiere():
return False return False
@pytest.fixture() @pytest.fixture()
def total_tracks(): def total_tracks():
return 1 return 1
@pytest.fixture @pytest.fixture
def mock_soundcloud_track_to_dict( def mock_soundcloud_track_to_dict(
mock_entry_to_dict, mock_entry_to_dict,
@ -37,7 +41,7 @@ def mock_soundcloud_track_to_dict(
track_number, track_number,
track_number_padded, track_number_padded,
is_premiere, is_premiere,
total_tracks total_tracks,
): ):
return dict( return dict(
mock_entry_to_dict, mock_entry_to_dict,
@ -47,7 +51,7 @@ def mock_soundcloud_track_to_dict(
"album": title, "album": title,
"sanitized_album": title, "sanitized_album": title,
"album_year": upload_year, "album_year": upload_year,
"total_tracks": total_tracks "total_tracks": total_tracks,
} }
) )
@ -70,7 +74,7 @@ def validate_soundcloud_track_properties(
track_number, track_number,
track_number_padded, track_number_padded,
is_premiere, is_premiere,
total_tracks total_tracks,
): ):
def _validate_soundcloud_track_properties(soundcloud_track: SoundcloudTrack): def _validate_soundcloud_track_properties(soundcloud_track: SoundcloudTrack):
assert validate_entry_properties(soundcloud_track) assert validate_entry_properties(soundcloud_track)