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

Type hints #373

Open
aucampia opened this issue Jul 12, 2024 · 1 comment
Open

Type hints #373

aucampia opened this issue Jul 12, 2024 · 1 comment

Comments

@aucampia
Copy link

aucampia commented Jul 12, 2024

boltons have some nice functionality but it would be very handy if it also had type hints. From #318 it seems you are open to type hints, but I just want to confirm this, and check if you have any specific preferences for how they should be added.

From what I gather from the linked issue:

  • You prefer type hints in .py files (i.e. embedded) as opposed to having them in separate .pyi files
  • You want validation in CI

Is there any thing more I should consider before working on it?

@mahmoud
Copy link
Owner

mahmoud commented Jul 12, 2024

Hey Iwan! Thanks for your interest and I'm glad you asked. Actually since going 3.7+, yes, I think the answer here has gotten a lot simpler: Type hints welcome, annotations preferred, no comments / .pyi necessary.

Other than that, I'd request smaller PRs preferred, starting with the functions/types that are least ambiguous to type or that you feel most comfortable typing. :) Also on the docket, if you're typing a signature that involves a **kwargs, feel free to convert it to * kw-only args. :)

Looking forward to seeing what you come up with!

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

No branches or pull requests

2 participants