add docstrings to python code

This commit is contained in:
geoffrey45
2022-02-06 23:26:22 +03:00
parent 195a50382a
commit 60ba512e64
13 changed files with 407 additions and 277 deletions
+3 -2
View File
@@ -127,11 +127,11 @@ def create_config_dir() -> None:
os.chmod(path, 0o755)
def getAllSongs() -> List:
def get_all_songs() -> List:
"""
Gets all songs under the ~/ directory.
"""
print("Getting all songs...")
tracks = []
for track in instances.songs_instance.get_all_songs():
@@ -140,6 +140,7 @@ def getAllSongs() -> List:
try:
os.chmod(os.path.join(home_dir, track.filepath), 0o755)
except FileNotFoundError:
print("")
instances.songs_instance.remove_song_by_filepath(track.filepath)
tracks.append(track)