Research: Explore type-enforcement
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by reviewing Python's typing module, mypy, the linked Google Python Style Guide guidance, and the listed migration posts. Compare available type-enforcement options and their tradeoffs, then document a recommendation for this project; done means the options and decision criteria are clearly recorded.
Written by the indexing model from the issue text.
Description
We've started documenting the types of function parameters in our Python docstrings. If we're doing that, we might as well do it programmatically so that static tools can verify the types for us.
What are our options for type enforcement in Python?
There's the native typing module as well as mypy. Are there other options? What are the tradeoffs between the available options?
The Google Python Style Guide now has guidance about type checking, but we don't necessarily have to adopt their strategy, as they're working under different constraints:
https://google.github.io/styleguide/pyguide.html#221-type-annotated-code
Blog posts about migrating to mypy
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 291
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tiny-pilot/tinypilot
-
bug medium
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
tiny-pilot/tinypilot#1419 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
tiny-pilot/tinypilot#1929 · 3 comments ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
tiny-pilot/tinypilot#1899 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
tiny-pilot/tinypilot#1896 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
tiny-pilot/tinypilot#1882 ·
All issues in tiny-pilot/tinypilot
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
zostera/django-bootstrap4#894 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
use-agent-os/agent-os#3276 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NousResearch/hermes-agent#117848 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
zilliztech/memsearch#759 ·