Skip to content

Commit

Permalink
fix: remove unnecessary None checks
Browse files Browse the repository at this point in the history
  • Loading branch information
vberlier committed Feb 1, 2023
1 parent 1327972 commit f464d62
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions beet/library/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,6 @@ def list_files(
extend = origin

for path, item in self.extra.items():
if item is None:
continue
if extensions and not any(path.endswith(ext) for ext in extensions):
continue
if extend and not isinstance(item, extend):
Expand Down Expand Up @@ -1029,8 +1027,6 @@ def list_files(
extend = origin

for path, item in self.extra.items():
if item is None:
continue
if extensions and not any(path.endswith(ext) for ext in extensions):
continue
if extend and not isinstance(item, extend):
Expand Down Expand Up @@ -1163,7 +1159,7 @@ def unveil(self, prefix: str, origin: Union[FileSystemPath, UnveilMapping]):

def dump(self, origin: FileOrigin):
"""Write the content of the pack to a zipfile or to the filesystem"""
extra = {path: item for path, item in self.extra.items() if item is not None}
extra = {path: item for path, item in self.extra.items()}
_dump_files(origin, extra)

for namespace_name, namespace in self.items():
Expand Down

0 comments on commit f464d62

Please sign in to comment.