Skip to content

Use ParamSpec to specify api function types - #93

Open
maffoo wants to merge 2 commits into
mainfrom
u/maffoo/param-spec2
Open

Use ParamSpec to specify api function types#93
maffoo wants to merge 2 commits into
mainfrom
u/maffoo/param-spec2

Conversation

@maffoo

@maffoo maffoo commented Apr 9, 2025

Copy link
Copy Markdown
Collaborator

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