From 2a17442bdae1ce3cb77bd23ab0cf898f3a849539 Mon Sep 17 00:00:00 2001 From: Thomas Scholtes Date: Mon, 28 Oct 2024 10:47:27 +0100 Subject: [PATCH] Ignore incompatible type hints in beets --- beetsplug/alternatives.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/beetsplug/alternatives.py b/beetsplug/alternatives.py index ced17c2..87adb21 100644 --- a/beetsplug/alternatives.py +++ b/beetsplug/alternatives.py @@ -270,7 +270,8 @@ def update(self, create: Optional[bool] = None): print_(f">{path} -> {dest}") dest.parent.mkdir(parents=True, exist_ok=True) path.rename(dest) - util.prune_dirs(str(path.parent), root=str(self.directory)) + # beets types are confusing + util.prune_dirs(str(path.parent), root=str(self.directory)) # pyright: ignore self._set_stored_path(item, dest) item.store() path = dest @@ -323,7 +324,8 @@ def _remove_file(self, item: Item): path = self._get_stored_path(item) if path: path.unlink(missing_ok=True) - util.prune_dirs(str(path), root=str(self.directory)) + # beets types are confusing + util.prune_dirs(str(path), root=str(self.directory)) # pyright: ignore del item[self.path_key] def _converter(self) -> "Worker":