Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typehints / stubs #664

Closed
PedroPerpetua opened this issue Jan 26, 2023 · 6 comments · Fixed by #760
Closed

Typehints / stubs #664

PedroPerpetua opened this issue Jan 26, 2023 · 6 comments · Fixed by #760

Comments

@PedroPerpetua
Copy link
Contributor

Are there any plans to add type stubs to this project?

@Andrew-Chen-Wang
Copy link
Member

Andrew-Chen-Wang commented Jan 26, 2023

Would love stubs typehints, but I don't have time to add anything for next few months, only maintenance. PRs welcome!

@abczzz13
Copy link
Contributor

abczzz13 commented Mar 8, 2023

I would be happy to help with this.

(actually, I already started on this and accidentally created a PR to the the main repo instead of my fork, which in turn started running the tests. Deleted the PR shortly after).

However, please note that I have limited experience with contributing to opensource libraries. Let me know if you would be willing to take a look at the PR.

@Andrew-Chen-Wang
Copy link
Member

happy to look and offer suggestions in the PR:) thanks for contributing

@PedroPerpetua
Copy link
Contributor Author

Bumping this issue @Andrew-Chen-Wang - I see @abczzz13 already did great work and finished the typehints, merged in #683; however, there appears to be missing a py.typed file. Linters like mypy use this file to denote that a certain package has type hints. This is easily fixed by adding an empty py.typed file to the package, and making sure it's shipped when installed with pip.

Relevant PEP: https://peps.python.org/pep-0561/#packaging-type-information

After this has been fixed, this topic can be closed I believe :)

@Andrew-Chen-Wang
Copy link
Member

I cannot commit directly. Kindly open a PR with the file py.typed so that I can merge

PedroPerpetua added a commit to PedroPerpetua/djangorestframework-simplejwt that referenced this issue Nov 4, 2023
@PedroPerpetua
Copy link
Contributor Author

I cannot commit directly. Kindly open a PR with the file py.typed so that I can merge

PR has been submited, #760

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants