Skip to content

Conversation

@qequ
Copy link
Contributor

@qequ qequ commented Nov 25, 2025

Type of Changes

Type
βœ“ πŸ› Bug fix
✨ New feature
πŸ”¨ Refactoring
πŸ“œ Docs

Description

This PR fixes a false positive in the logging-unsupported-format checker when logging statements contain format-like strings but no arguments are supplied.

Closes #10752

@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 95.98%. Comparing base (6f7f8db) to head (00b9d7e).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #10758   +/-   ##
=======================================
  Coverage   95.98%   95.98%           
=======================================
  Files         176      176           
  Lines       19540    19561   +21     
=======================================
+ Hits        18755    18776   +21     
  Misses        785      785           
Files with missing lines Coverage Ξ”
pylint/checkers/logging.py 94.80% <100.00%> (+0.03%) ⬆️

... and 2 files with indirect coverage changes

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Contributor

πŸ€– According to the primer, this change has no effect on the checked open source code. πŸ€–πŸŽ‰

This comment was generated for commit 00b9d7e

Copy link
Collaborator

@DanielNoord DanielNoord left a 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? :)

@Pierre-Sassoulas
Copy link
Member

I think there's a decision to take here because 'fixing' this might make the checker useless (it won't detect % when one wanted to do %d or it won't detect %test). I.e. it's possible that this checker cannot work without some false positives. I was absolutely sure that the original issue was a duplicate but I haven't been able to find another issue talking about it (Maybe #9999 ?), so there's already a MR for this (which isn't nice if we're going to reject in the end)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[logging-unsupported-format] false negative if no logging args are supplied

3 participants