Modernize the codebase
未關閉
- 主要語言
- Python
- 星號
- 537
- 分支
- 118
- PR 合併指標
- 30 天內沒有已合併 PR
描述
As we now support Python 3.10+ only, there are some old patterns that could be updated.
- Use builtin generics (`list`, `tuple`, `dict`, `type`) (PEP 585)
- Use `|` instead of `Union` and `Optional` with explicit defaults (PEP 604)
- Move ABCs from `typing` to `collections.abc`
- Migrate `@types.coroutine` and `yield from` → `async def __anext__(self): ...` and `await`
- Migrate `asyncio.get_event_loop()` to `asyncio.get_running_loop()` or `asyncio.run()`
- Migrate quoted string annotations in favor of `__future__.annotations`
貢獻指南
評估
這個 Issue 還沒有評估資料。