From 0ae7d01a1ed6e4e5363f62ab8cf7f82a0c5bbe68 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 26 Oct 2024 10:57:08 +0200 Subject: [PATCH 1/2] =?UTF-8?q?artists=20=E2=86=92=20authors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rwx/sw/freetube/{artists.py => authors.py} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename rwx/sw/freetube/{artists.py => authors.py} (84%) diff --git a/rwx/sw/freetube/artists.py b/rwx/sw/freetube/authors.py similarity index 84% rename from rwx/sw/freetube/artists.py rename to rwx/sw/freetube/authors.py index 0584296..7f108e7 100644 --- a/rwx/sw/freetube/artists.py +++ b/rwx/sw/freetube/authors.py @@ -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. From 27329865ee44b6f3d75e19de078bef0706ef396d Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 26 Oct 2024 10:57:20 +0200 Subject: [PATCH 2/2] fs/wipe --- rwx/fs/__init__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/rwx/fs/__init__.py b/rwx/fs/__init__.py index 205746d..0772a8d 100644 --- a/rwx/fs/__init__.py +++ b/rwx/fs/__init__.py @@ -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: