Unbabel / COMET

A Neural Framework for MT Evaluation
https://unbabel.github.io/COMET/html/index.html
Apache License 2.0
493 stars 76 forks source link

Add missing library stubs or py.typed marker #219

Open jblemoine opened 4 months ago

jblemoine commented 4 months ago

🚀 Feature

Add missing py.typed marker

Motivation

This proposal aims to make the project adhere to the PEP 561 standard for stub packages, thereby enabling type checking. Given that the project is largely typed, it could also benefit other packages that depend on comet and utilize mypy.

Alternatives

Another option is to configure mypy to disregard missing import errors in projects that rely on comet. For example by adding a # type: ignore at the end of the line containing the import.

Additional context

I'm using comet in my personal project, which has a CI step for type checking.