twilio-python icon indicating copy to clipboard operation
twilio-python copied to clipboard

chore: create py.typed

Open zunda-arrow opened this issue 2 years ago • 3 comments

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

  • [x] I acknowledge that all my contributions will be made under the project's license
  • [x] I have made a material change to the repo (functionality, testing, spelling, grammar)
  • [x] I have read the Contribution Guidelines and my PR follows them
  • [x] I have titled the PR appropriately
  • [x] I have updated my branch with the main branch
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] I have added the necessary documentation about the functionality in the appropriate .md file
  • [x] I have added inline documentation to the code I modified

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

zunda-arrow avatar Sep 09 '23 00:09 zunda-arrow

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

tiwarishubham635 avatar Apr 04 '24 18:04 tiwarishubham635

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.

zunda-arrow avatar Apr 05 '24 02:04 zunda-arrow

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

zunda-arrow avatar May 13 '24 17:05 zunda-arrow