Skip to content

Commit

Permalink
fix: missing __all__ + spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
RitikShah authored and vberlier committed Feb 1, 2023
1 parent 7a652a1 commit 7ee59e7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions beet/library/resource_pack.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
__all__ = [
"Atlas",
"ResourcePack",
"ResourcePackNamespace",
"Blockstate",
Expand Down Expand Up @@ -277,12 +278,10 @@ def merge(self, other: "Atlas") -> bool: # type: ignore

def append(self, other: "Atlas"):
"""Append values from another atlas."""

self.merge(other)

def prepend(self, other: "Atlas"):
"""Prepend values from another atlas."""

values = self.data.setdefault("sources", [])

for value in other.data.get("sources", []):
Expand All @@ -291,14 +290,12 @@ def prepend(self, other: "Atlas"):

def add(self, value: JsonDict):
"""Add an entry."""

values = self.data.setdefault("sources", [])
if value not in values:
values.append(value)

def remove(self, value: JsonDict):
"""Remove an entry."""

values = self.data.setdefault("sources", [])
with suppress(ValueError):
values.remove(value)
Expand Down

0 comments on commit 7ee59e7

Please sign in to comment.