twilio / twilio-python

A Python module for communicating with the Twilio API and generating TwiML.
MIT License
1.84k stars 703 forks source link

chore: create py.typed #722

Open Lunarmagpie opened 1 year ago

Lunarmagpie commented 1 year ago

Add py.typed file. This allows typecheckers to be used with the library. I looked at the code and it looks typed so I'm pretty sure this is a useful change here.

Fixes

A short description of what this PR does.

Checklist

If you have questions, please file a support ticket, or create a GitHub Issue in this repository.

tiwarishubham635 commented 5 months ago

Hi @Lunarmagpie! Can you share how this can we use this?

Lunarmagpie commented 5 months ago

Hi @Lunarmagpie! Can you share how this can we use this?

Hello. all you need to do for py.typed is add it as an extra file for the packaging system that is used with this project. Once people download it as a dependency, pyright and mypy won't give the missing types error when you typecheck a package using this library.

Lunarmagpie commented 4 months ago

I remembered there is a PEP for this https://peps.python.org/pep-0561/