deepspeedai / deepspeedai/DeepSpeed
Add type hints to public API functions
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 43.1k
- Forks
- 5k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 112
Description
Feature Request
Summary
Adding type hints to public API functions would significantly improve developer experience and enable better tooling support.
Motivation
- IDEs can provide better autocomplete and inline documentation
- Static type checkers like
mypycan catch bugs before runtime - New contributors can understand the expected inputs/outputs faster
- Type hints serve as machine-checked documentation
Proposed Change
Add type annotations to all public functions:
# Before:
def process(data, config=None):
...
# After:
from typing import Optional, Dict, Any
def process(data: Dict[str, Any], config: Optional[Dict] = None) -> bool:
...
Additional Context
This is a non-breaking change and can be done incrementally, starting with the most-used public functions.
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.
Research direction
Start by inventorying the public Python functions and checking whether the repository already has typing or mypy conventions. Define a bounded first group of the most-used public APIs, then add annotations for their inputs and outputs. Use mypy to verify the result; the issue does not name specific files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100