Fix remaining type errors with Python 3.12.
This commit is contained in:
parent
8857acb7d6
commit
60af6fde62
@ -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
|
||||||
|
@ -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 = []
|
||||||
|
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user