typeshed
typeshed copied to clipboard
TaskGroup create_task missing eager_start and kwargs
The type shed https://github.com/python/typeshed/blob/main/stdlib/asyncio/taskgroups.pyi on line 25 is missing eager_start and kwargs, should read:
def create_task(self, coro: _CoroutineLike[_T], *, name: str | None = None, context: Context | None = None, eager_start: bool | None = None, **kwargs: Any) -> Task[_T]: ...
Added in 3.14. I'm not sure we should add kwargs, though. Instead copying the actual args from Task.__init__() seems safest to me. (Although as I'm not a great asyncio expert, I could be persuaded otherweise.)