Skip to content

πŸ’‘ [Feature]: Introduce Type Hints and Mypy Verification Across All ScriptsΒ #970

@knoxiboy

Description

@knoxiboy

❓ Problem Statement

Because Python is dynamically typed, passing the wrong data type to a function (e.g., a string instead of an int in a math script) causes runtime crashes. Without type hints, maintaining large scripts is difficult.

πŸš€ Proposed Enhancement

Add Python 3 standard type hints (int, str, List, Optional) to all function signatures and complex variables across the repository, and enforce them in CI using mypy.

πŸ› οΈ Suggested Implementation

  1. Add type hints to all def statements: def calculate_score(points: int, bonus: float) -> float:
  2. Add mypy to the requirements.txt.
  3. Add a mypy . step to the GitHub Actions workflow.

Additional Notes

  • I am a registered GSSoC 2026 contributor.
  • I would like to implement this feature myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions