Skip to content

Use ParamSpec to specify api function types #93

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

maffoo
Copy link
Collaborator

@maffoo maffoo commented Apr 9, 2025

Previously we were specifying these types somewhat loosely and relying on the duet.typing plugin to ensure that things typecheck correctly. But with typing.ParamSpec we can make the types more precise, eliminating the need for the duet.typing plugin in most cases (it is still needed if using duet.sync on @overload-ed functions, since mypy doesn't consider overloads when analyzing ParamSpec).

@maffoo maffoo force-pushed the u/maffoo/param-spec2 branch from abedd30 to ce50550 Compare April 9, 2025 20:03
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

Successfully merging this pull request may close these issues.

1 participant