Skip to content

Commit

Permalink
fix: revert bool tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
vberlier committed Jun 18, 2022
1 parent 2707490 commit 54f83f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions 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 @@ -818,11 +818,7 @@ def __eq__(self, other: Any) -> bool:
return NotImplemented

def __bool__(self) -> bool:
return (
any(self.values())
or self.extra.keys() > {"pack.mcmeta"}
or self.mcmeta != self.__class__().mcmeta
)
return any(self.values()) or self.extra.keys() > {"pack.mcmeta"}

def __enter__(self: T) -> T:
return self
Expand Down
1 change: 1 addition & 0 deletions tests/test_resource_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def test_default():
)
def test_empty(snapshot: SnapshotFixture, pack: ResourcePack):
assert snapshot("resource_pack") == pack
assert not pack
assert dict(pack) == {}


Expand Down

0 comments on commit 54f83f9

Please sign in to comment.