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

Use typing.Annotated for arg transformations instead of a 'callable annotation' #30

Open
bswck opened this issue Dec 7, 2023 · 3 comments

Comments

@bswck
Copy link

bswck commented Dec 7, 2023

During reading the pip-run code, I raised an eyebrow upon seeing this:
https://github.com/jaraco/pip-run/blob/f5c50a4c2a84bc43ed090820d44f2d4bac6cb0c6/pip_run/read-deps.py#L21

Thanks to typing.Annotated being present, there is a modern, type-safe way to do it, like here:
https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#add-query-to-annotated-in-the-q-parameter

@jaraco
Copy link
Contributor

jaraco commented Apr 4, 2024

I encountered this issue again today in jaraco/jaraco.home@33fb951.

@jaraco
Copy link
Contributor

jaraco commented Apr 4, 2024

I'll offer a $50 bounty for an accepted PR on this issue.

@bswck
Copy link
Author

bswck commented Apr 5, 2024

I'll take it along with #34. 🚀

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