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

Do not erase function types in decorators #135

Merged
merged 3 commits into from
May 18, 2023

Conversation

alanhdu
Copy link
Contributor

@alanhdu alanhdu commented May 18, 2023

Right now, using these decorators essentially eases the type signature of the functions they are applied to (since the output type is just Callable[..., Any]. But by making these functions generic, we can correctly preserve the type signatures involved.

Copy link
Contributor

@carmocca carmocca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@Borda Borda enabled auto-merge (squash) May 18, 2023 19:37
@Borda Borda merged commit 2e8cb3c into Lightning-AI:main May 18, 2023
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.

3 participants