1
0
mirror of synced 2024-11-30 16:54:30 +01:00

Fix remaining type errors with Python 3.12.

This commit is contained in:
Jennifer Taylor 2024-09-26 01:05:52 +00:00
parent 8857acb7d6
commit 60af6fde62
3 changed files with 6 additions and 5 deletions

View File

@ -3,11 +3,12 @@ import binascii
import base64 import base64
try: try:
# Python <= 3.9
from collections import Iterable
except ImportError:
# Python > 3.9 # Python > 3.9
from collections.abc import Iterable from collections.abc import Iterable
except ImportError:
# Python <= 3.9
from collections import Iterable # type: ignore
from typing import Any, Dict, List, Sequence, Union from typing import Any, Dict, List, Sequence, Union
from bemani.backend.bishi.base import BishiBashiBase from bemani.backend.bishi.base import BishiBashiBase

View File

@ -182,6 +182,7 @@ class JubeatBase(CoreHandler, CardManagerHandler, PASELIHandler, Base):
# if this returns None anyway. # if this returns None anyway.
scores = self.cache.get(cache_key) or [] scores = self.cache.get(cache_key) or []
rest: List[Score]
if len(scores) < 50: if len(scores) < 50:
# We simply return the whole amount for this, and cache nothing. # We simply return the whole amount for this, and cache nothing.
rest = [] rest = []

View File

@ -1371,8 +1371,7 @@ class TXP2File(TrackedCoverage, VerboseOutput):
raise Exception("Cannot update texture with different size!") raise Exception("Cannot update texture with different size!")
# Now, get the raw image data, and let the TDXT container refresh the raw. # Now, get the raw image data, and let the TDXT container refresh the raw.
img = img.convert("RGBA") texture.img = img.convert("RGBA")
texture.img = img
return return
else: else: