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

Avoid D301 autofix for u prefixed strings #8495

Merged
merged 1 commit into from
Nov 5, 2023
Merged

Avoid D301 autofix for u prefixed strings #8495

merged 1 commit into from
Nov 5, 2023

Conversation

dhruvmanila
Copy link
Member

This PR avoids creating the fix for D301 if the string is prefixed with u i.e., it's a unicode string. The reason being that u and r cannot be used together as it's a syntax error.

Refer: #8402 (comment)

@dhruvmanila dhruvmanila added the bug Something isn't working label Nov 5, 2023
Copy link
Contributor

github-actions bot commented Nov 5, 2023

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@charliermarsh
Copy link
Member

Seems reasonable, though better I think we could be to remove the u since it's unnecessary in Python 3 IIRC.

@charliermarsh charliermarsh merged commit b3c2935 into main Nov 5, 2023
17 checks passed
@charliermarsh charliermarsh deleted the dhruv/d301 branch November 5, 2023 14:45
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.

2 participants