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

Error context for string interpolation may be wrong #7528

Open
ilevkivskyi opened this issue Sep 18, 2019 · 1 comment
Open

Error context for string interpolation may be wrong #7528

ilevkivskyi opened this issue Sep 18, 2019 · 1 comment

Comments

@ilevkivskyi
Copy link
Member

If there are multiple replacements like '%s, %s' % (one, other), many errors (e.g. wrong replacement type) are reported with the tuple expression as the location. It would be better to set specific item as the error context as the current way can be quite misleading if one uses, --show-column-numbers, or --pretty, or one has a multi-line interpolation.

@ilevkivskyi
Copy link
Member Author

One of the examples is #7740

@AlexWaygood AlexWaygood added the topic-error-reporting How we report errors label Apr 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants