arthurdejong / python-stdnum

A Python library to provide functions to handle, parse and validate standard numbers.
https://arthurdejong.org/python-stdnum/
GNU Lesser General Public License v2.1
484 stars 203 forks source link

Provide type hints for type checkers and language servers #433

Open Daverball opened 2 months ago

Daverball commented 2 months ago

While there are a lot of modules in this package, since the common interface is very simple from a type system perspective I think it would introduce little to no additional maintenance burden to include type hints and the majority of the initial hints could be added automatically for the common interface using something like sed or awk.

If there's any interest in maintaining inline type hints I'd be happy to create a pull request, if you'd rather not, I can go the typeshed route instead. I've already contributed type hints for various third party packages including Chameleon, WebOb, WTForms, uWSGI and gevent, just to name a few.