Skip to content

Commit

Permalink
Ignore incompatible type hints in beets
Browse files Browse the repository at this point in the history
  • Loading branch information
geigerzaehler committed Oct 28, 2024
1 parent 9f0bd69 commit 2a17442
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions beetsplug/alternatives.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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":
Expand Down

0 comments on commit 2a17442

Please sign in to comment.