Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add type hints to public API functions #8074

Copy link
Copy link

Description

@goransh-buh
Issue body actions

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.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.