Compare commits

...

2 commits

Author SHA1 Message Date
27329865ee
fs/wipe
All checks were successful
/ job (push) Successful in 1m10s
2024-10-26 10:57:20 +02:00
0ae7d01a1e
artists → authors 2024-10-26 10:57:08 +02:00
2 changed files with 5 additions and 7 deletions

View file

@ -139,11 +139,9 @@ def wipe(path: Path) -> None:
:type path: Path
"""
try:
shutil.rmtree(path)
except NotADirectoryError:
path.unlink(missing_ok=True)
except FileNotFoundError:
pass
except IsADirectoryError:
shutil.rmtree(path)
def write(file_path: Path, text: str, charset: str = CHARSET) -> None:

View file

@ -1,4 +1,4 @@
"""FreeTube artists."""
"""FreeTube authors."""
from typing import TYPE_CHECKING
@ -8,8 +8,8 @@ if TYPE_CHECKING:
from .playlists import Playlist
class Artist(Object):
"""FreeTube artist."""
class Author(Object):
"""FreeTube author."""
def __init__(self, uid: str, name: str) -> None:
"""Set uid & name.