-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
regression in new logging-format-style scheme #3361
Comments
Originally I had only allowed a single option to be chosen so that the message could give better guidance on which types of logging formatting were invalid. But it's more complicated than that. Originally we were relying on the user to tell us which type of formatting was being used so that we knew how to interpret the arguments. We should be able to figure this out ourselves though. We can reliably detect whether a format string or the new style format function is being called, and by process of elimination whether it's old style formatting. You're right that it's not ideal that only one style of formatting is allowed. The message might have to be more vague about how to solve the message. We could possibly base it on which of the messages are enabled or disabled. I don't know if it makes sense to keep the So to summarise, I am proposing:
@PCManticore What do you think? Is the trade off of a more vague message worth the additional flexibility? I've marked this as a blocker because if we decide that what #3095 implemented isn't right, then we need to rectify that before we do a release with |
@AWhetter Thanks for the clear proposal, I'm on board with it. Let's get this in time for 2.5. |
This will address #3362 as well? |
It will, yes. |
Hello At which version was I have disabled it (per-file or per-line) in many parts of different projects and now I have complaints about wrong option (W1203) and (logging-fstring-interpolation) all over the place after update to 2.4.4. While 2.5 with the final conclusion on the logging is not released yet, I'd like to roll back rather than replacing W1203 with W1202 in each file. Thanks! |
I have a project which uses both % and f-string styles for logging
Previously lint could pass using
logging-format-style=old
in combination withdisable=logging-fstring-interpolation
Now,
logging-fstring-interpolation
is retired, andlogging-format-style
allows choice of only one style. So I'm forced to disablelogging-format-interpolation
completely.(Reference: #2395, #3095)
The text was updated successfully, but these errors were encountered: