-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix unsupported logging format check #10758
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Alvaro Frias <alvaro.frias@eclypsium.com>
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10758 +/- ##
=======================================
Coverage 95.98% 95.98%
=======================================
Files 176 176
Lines 19540 19561 +21
=======================================
+ Hits 18755 18776 +21
Misses 785 785
π New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
DanielNoord
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a functional test for this behaviour? :)
|
I think there's a decision to take here because 'fixing' this might make the checker useless (it won't detect |
|
@Pierre-Sassoulas I think treating %s differently from %foo as proposed makes sense. I didn't quite follow your doubt. |
|
My point was that there's classes of issues that pylint won't warn about anymore, like missing specifier after a %, but I missed that there have to be two mistakes from the user for them to be an actual error, so I agree with you now. |
Pierre-Sassoulas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@qequ sorry for the noise, do you mind adding functional test like Daniel suggested ?
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please write your tests in the existing style in test/functional, see https://pylint.readthedocs.io/en/latest/development_guide/contributor_guide/tests/writing_test.html#writing-functional-tests.
Signed-off-by: Alvaro Frias <alvaro.frias@eclypsium.com>
|
π€ According to the primer, this change has no effect on the checked open source code. π€π This comment was generated for commit 3c1b8ec |
Type of Changes
Description
This PR fixes a false positive in the
logging-unsupported-formatchecker when logging statements contain format-like strings but no arguments are supplied.Closes #10752