Skip to content

Commit 03caa7d

Browse files
authored
Add type hint style guidance to AGENTS.md (#739)
Document the convention (from PR #548 review feedback) to use modern Python 3.10+ type hint syntax: X | None, lowercase builtins, Literal. Made-with: Cursor
1 parent b5e8d6b commit 03caa7d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ See the [python-environment skill](.github/skills/python-environment/SKILL.md) f
7676
- `ignore-missing-imports`: Enabled to allow for gradual adoption of type hints without requiring all third-party libraries to have stubs.
7777
- `additional_dependencies`: Includes `numpy` and `pandas-stubs` to provide type information for these libraries.
7878
- **Execution**: Run automatically via `pre-commit run --all-files` or on commit.
79+
- **Style**: Use Python 3.10+ type hint syntax. Specifically: `X | None` not `Optional[X]`, lowercase `dict`, `list`, `tuple` not `Dict`, `List`, `Tuple` from `typing`, and `Literal` for constrained string parameters.
7980

8081
## GitHub Issue Workflows
8182

0 commit comments

Comments
 (0)