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

[ruff] Avoid false positives for RUF027 for typing context bindings. #15037

Merged
merged 3 commits into from
Dec 18, 2024

Conversation

Daverball
Copy link
Contributor

Closes #14000

Summary

For typing context bindings we know that they won't be available at runtime. We shouldn't recommend a fix, that will result in name errors at runtime.

Test Plan

cargo nextest run

Copy link
Contributor

github-actions bot commented Dec 17, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

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

Nice

@MichaReiser MichaReiser added rule Implementing or modifying a lint rule preview Related to preview mode features labels Dec 17, 2024
Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

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

Thanks

@MichaReiser MichaReiser merged commit c0b7c36 into astral-sh:main Dec 18, 2024
21 checks passed
@Daverball Daverball deleted the bugfix/ruf027-typing-context branch December 18, 2024 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Related to preview mode features rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RUF027 False positive for non-runtime context binding
2 participants