MartinThoma / openpyxl-stubs

Type stubs for openpyxl
MIT License
9 stars 9 forks source link

Favoring `types-openpyxl` from typeshed #30

Open Avasam opened 4 months ago

Avasam commented 4 months ago

Hello @MartinThoma !

About 2 years ago, openpyxl stubs were added to typeshed at https://github.com/python/typeshed/tree/main/stubs/openpyxl

Since then, I've migrated https://github.com/microsoft/python-type-stubs/tree/676f45e267971c0fe9977c76c331a7cb158f8882/openpyxl so that typeshed's stubs are on-par or better than what the stubs shipped with Pylance used to be.

pyright/pylance now ship with typeshed's types-openpyxl and mypy will also automatically suggest installing it when encountering openpyxl imports w/o any stubs installed.

Some users are also confused about types-openpyxl vs openpyxl-stubs, as shown by this recent stack overflow post: https://stackoverflow.com/questions/78358388/worksheet-row-dimensions-type-hinting-does-not-work-properly#comment138146462_78358388

After a cursory glance over the current openpxl-stubs, it would also seem that the typeshed stubs are on-par or improved in every aspect, except for that typeshed does not expose private undocumented symbols.

If you agree, I would suggest to update this project's readme to forward users to types-openpyxl, with a new PyPI release to update the package description.