-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Needs decision 🔒Needs a decision before implemention or rejectionNeeds a decision before implemention or rejectionProposal 📨
Milestone
Description
Bug description
s = "text %s"
s = s % 5
Formally, the warning is acceptable, as %=
construct indeed can be used in this situation.
But from my point of view using s %= 5
in this context would look weird, be misleading and should not be recommended.
So my proposition is to turn off this checker for %
operation where the left operand is str
or bytes
.
Command used
pylint test.py
Pylint output
************* Module test
test.py:2: [R6104(consider-using-augmented-assign), ] Use '%=' to do an augmented assign directly
Expected behavior
no output
Pylint version
pylint 2.16.1
astroid 2.14.1
Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]
OS / Environment
Ubuntu 22.04.1
Metadata
Metadata
Assignees
Labels
Needs decision 🔒Needs a decision before implemention or rejectionNeeds a decision before implemention or rejectionProposal 📨