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

Respect runtime-required decorators on functions #9317

Merged
merged 1 commit into from
Dec 30, 2023

Conversation

charliermarsh
Copy link
Member

Summary

This PR modifies the semantics of runtime-evaluated-decorators to respect decorators on both classes and functions. Historically, this only respected classes, since the common use-case is (e.g.) pydantic.BaseModel -- but functions are equally valid.

Closes #9312.

Test Plan

cargo test

@charliermarsh charliermarsh added the configuration Related to settings and configuration label Dec 29, 2023
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@charliermarsh charliermarsh merged commit 9472799 into main Dec 30, 2023
17 checks passed
@charliermarsh charliermarsh deleted the charlie/runtime-decorator branch December 30, 2023 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration Related to settings and configuration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

runtime-evaluated-decorators not working for the annotations of decorated functions.
2 participants