mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
lufia2ac: coop support + update AP version number to 0.4.2 (#1868)
* Core: typing for async_start * CommonClient: add a framework for clients to subscribe to data storage key notifications * Core: update version to 0.4.2 * lufia2ac: coop support
This commit is contained in:
8
Utils.py
8
Utils.py
@@ -42,7 +42,7 @@ class Version(typing.NamedTuple):
|
||||
return ".".join(str(item) for item in self)
|
||||
|
||||
|
||||
__version__ = "0.4.1"
|
||||
__version__ = "0.4.2"
|
||||
version_tuple = tuplize_version(__version__)
|
||||
|
||||
is_linux = sys.platform.startswith("linux")
|
||||
@@ -766,10 +766,10 @@ def read_snes_rom(stream: BinaryIO, strip_header: bool = True) -> bytearray:
|
||||
return buffer
|
||||
|
||||
|
||||
_faf_tasks: "Set[asyncio.Task[None]]" = set()
|
||||
_faf_tasks: "Set[asyncio.Task[typing.Any]]" = set()
|
||||
|
||||
|
||||
def async_start(co: Coroutine[typing.Any, typing.Any, bool], name: Optional[str] = None) -> None:
|
||||
def async_start(co: Coroutine[None, None, typing.Any], name: Optional[str] = None) -> None:
|
||||
"""
|
||||
Use this to start a task when you don't keep a reference to it or immediately await it,
|
||||
to prevent early garbage collection. "fire-and-forget"
|
||||
@@ -782,7 +782,7 @@ def async_start(co: Coroutine[typing.Any, typing.Any, bool], name: Optional[str]
|
||||
# ```
|
||||
# This implementation follows the pattern given in that documentation.
|
||||
|
||||
task = asyncio.create_task(co, name=name)
|
||||
task: asyncio.Task[typing.Any] = asyncio.create_task(co, name=name)
|
||||
_faf_tasks.add(task)
|
||||
task.add_done_callback(_faf_tasks.discard)
|
||||
|
||||
|
Reference in New Issue
Block a user