Skip to content

replace mypy with ty from astral #30

@GabrielVGS

Description

@GabrielVGS

Replace mypy with ty (Astral)

Is your feature request related to a problem?

Currently, the project uses mypy for static type checking. While powerful, mypy can be slow, has complex configurations, and sometimes lacks ergonomics when working with modern Python features. This affects developer experience and feedback speed.

Describe the solution you'd like

Replace mypy with ty from Astral.
ty is a modern, fast type checker designed to be more user-friendly and performant. It provides faster feedback loops and simpler configuration, improving the developer experience.

Describe alternatives you've considered

  • Keeping mypy as is and continuing to maintain its configuration.
  • Using other type checkers like pyright or pyre.

Feature Category

What type of feature is this?

  • API enhancement
  • Database/Migration improvement
  • Developer experience (DX) improvement
  • Testing/CI improvement
  • Performance optimization
  • Security enhancement
  • Documentation improvement
  • Docker/Deployment improvement
  • Background task/Celery improvement
  • Caching/Redis improvement
  • Other: _______________

Implementation Details (if you have ideas)

  • Remove mypy and its related configuration files.
  • Add ty as a development dependency.
  • Configure ty in the project (align with existing CI setup).
  • Update CI/CD workflows to run ty instead of mypy.
  • Document the change in the contribution guide.

Breaking Changes

  • This change would be backwards compatible
  • This change would require breaking changes
  • Not sure

If breaking changes, please describe what would break and migration path.
mypy-specific configurations and suppression comments will no longer be valid. Migration path involves removing mypy configs and aligning type checks with ty.

Additional Context

⚠️ Note: ty is still early-stage and not production ready. This issue is being opened for future consideration but will remain stale until ty matures and is safe for production use.

Would you be willing to implement this feature?

  • Yes, I can implement this
  • Yes, but I would need guidance
  • No, I'm just suggesting the idea

Related Issues/PRs

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency fileenhancementNew feature or requeststale

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions