Skip to content

Commit

Permalink
Fixes for new FastAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
Willy-JL committed Aug 24, 2024
1 parent 10b8a5e commit b075862
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions indexer/src/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def parse(self, filename: str) -> None:


class PackParser(BaseModel):
ANIM_REGEX = re.compile(rb"^Name: ", re.MULTILINE)
anim_regex: ClassVar[re.Pattern] = re.compile(rb"^Name: ", re.MULTILINE)

def getSHA256(self, filepath: str) -> str:
with open(filepath, "rb") as file:
Expand Down Expand Up @@ -249,7 +249,7 @@ def parse(self, packpath: str) -> Pack:
fonts = set()
if (pack_entry / "Anims/manifest.txt").is_file():
manifest = (pack_entry / "Anims/manifest.txt").read_bytes()
anims = sum(1 for _ in self.ANIM_REGEX.finditer(manifest))
anims = sum(1 for _ in self.anim_regex.finditer(manifest))
if (pack_entry / "Icons").is_dir():
for icon_set in (pack_entry / "Icons").iterdir():
if icon_set.name.startswith(".") or not icon_set.is_dir():
Expand Down

0 comments on commit b075862

Please sign in to comment.