Skip to content

Commit

Permalink
Merge pull request #106 from geigerzaehler/beets-types
Browse files Browse the repository at this point in the history
Ignore incompatible type hints in beets
  • Loading branch information
geigerzaehler authored Oct 28, 2024
2 parents 9f0bd69 + 2a17442 commit f513921
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 f513921

Please sign in to comment.