Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add type hints to public API functions

Open
#8,074 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
python

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.

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 mypy can 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.

Dominant language
Python
Stars
43.3k
Forks
5.1k
Avg merge
4d 20h
Merged PRs (30d)
69

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from deepspeedai/DeepSpeed

All issues in deepspeedai/DeepSpeed

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.