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

Add semantic model flag when inside f-string replacement field #10766

Merged
merged 1 commit into from Apr 4, 2024

Conversation

dhruvmanila
Copy link
Member

Summary

This PR adds a new semantic model flag to indicate that the checker is inside an f-string replacement field. This will be used to ignore certain checks if the target version doesn't support a specific feature like PEP 701.

fixes: #10761

Test Plan

Add a test case from the raised issue.

@dhruvmanila dhruvmanila added the bug Something isn't working label Apr 4, 2024
Copy link

github-actions bot commented Apr 4, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@dhruvmanila dhruvmanila merged commit d02b106 into main Apr 4, 2024
17 checks passed
@dhruvmanila dhruvmanila deleted the dhruv/f-string-model-flag branch April 4, 2024 03:38
Glyphack pushed a commit to Glyphack/ruff that referenced this pull request Apr 12, 2024
…l-sh#10766)

## Summary

This PR adds a new semantic model flag to indicate that the checker is
inside an f-string replacement field. This will be used to ignore
certain checks if the target version doesn't support a specific feature
like PEP 701.

fixes: astral-sh#10761 

## Test Plan

Add a test case from the raised issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SyntaxError after bad fix in f-string from Q000 flake8 bad-quotes-inline-string
2 participants