mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
Zillion: some typing fixes (#2534)
`colorama` has type stubs when it didn't before `ZillionDeltaPatch.hash` annotated type could be `None` but md5s doesn't allow `None` type of `CollectionState.prog_items` changed `WorldTestBase` moved all of the following are related to this issue: https://github.com/python/typing/discussions/1486 CommonContext for `command_processor` (is invalid without specifying immutable - but I don't need it anyway) ZillionWorld options and settings (is invalid without specifying immutable - but I do need it)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import asyncio
|
||||
import base64
|
||||
import platform
|
||||
from typing import Any, ClassVar, Coroutine, Dict, List, Optional, Protocol, Tuple, Type, cast
|
||||
from typing import Any, ClassVar, Coroutine, Dict, List, Optional, Protocol, Tuple, cast
|
||||
|
||||
# CommonClient import first to trigger ModuleUpdater
|
||||
from CommonClient import CommonContext, server_loop, gui_enabled, \
|
||||
@@ -10,7 +10,7 @@ from NetUtils import ClientStatus
|
||||
import Utils
|
||||
from Utils import async_start
|
||||
|
||||
import colorama # type: ignore
|
||||
import colorama
|
||||
|
||||
from zilliandomizer.zri.memory import Memory
|
||||
from zilliandomizer.zri import events
|
||||
@@ -45,7 +45,7 @@ class SetRoomCallback(Protocol):
|
||||
|
||||
class ZillionContext(CommonContext):
|
||||
game = "Zillion"
|
||||
command_processor: Type[ClientCommandProcessor] = ZillionCommandProcessor
|
||||
command_processor = ZillionCommandProcessor
|
||||
items_handling = 1 # receive items from other players
|
||||
|
||||
known_name: Optional[str]
|
||||
|
Reference in New Issue
Block a user