chore: add TypedDict related prompt to AGENTS.md (#32995)

Co-authored-by: caoergou <caogou123@163.com>
This commit is contained in:
Eric Cao 2026-03-05 09:08:18 +08:00 committed by GitHub
parent 2b5ce196ad
commit 164ccb7c48
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,7 +29,7 @@ The codebase is split into:
## Language Style
- **Python**: Keep type hints on functions and attributes, and implement relevant special methods (e.g., `__repr__`, `__str__`).
- **Python**: Keep type hints on functions and attributes, and implement relevant special methods (e.g., `__repr__`, `__str__`). Prefer `TypedDict` over `dict` or `Mapping` for type safety and better code documentation.
- **TypeScript**: Use the strict config, rely on ESLint (`pnpm lint:fix` preferred) plus `pnpm type-check:tsgo`, and avoid `any` types.
## General Practices