-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Better error message using byte string where only regular strings are allowed in attributes #54926
Comments
It might also be valid to give this an error code and explain it all there. |
@petrochenkov mentioned in #54929 that the error message should be done for all places a byte string might be erroneously used instead of an actual string literal. I agree, so I'm generalizing this issue out to that. |
Petrochenkov's technical-debt concern (which I agree with) also came up in #54683. |
Self quoting from #54929:
|
The error message shows the code that matters.
It should probably suggest removing the
b
. Likewise if using single quotes, it should suggest using double quotes. Both should also be machine applicable. Raw strings are allowed, so nothing needs to be done with them.The text was updated successfully, but these errors were encountered: