-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
False Negative 🦋No message is emitted but something is wrong with the codeNo message is emitted but something is wrong with the codeNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementation
Description
Bug description
bad-format-character is not raised for new-style string formatting and f-strings.
# pylint: disable=consider-using-f-string, missing-module-docstring
PI = 3.1415
print("Pi is %.2v" % PI)
print("Pi is {:.2v}".format(PI))
print(f"Pi is {PI:.2v}")Configuration
No response
Command used
pylint a.pyPylint output
************* Module a
a.py:3:6: E1300: Unsupported format character 'v' (0x76) at index 9 (bad-format-character)Expected behavior
bad-format-character is currently only emitted for the old-style string formatting.
It should also cover new style formatting and f-strings.
Pylint version
pylint 2.14.0-dev0
astroid 2.11.2
Python 3.9.6 (default, Jul 28 2021, 21:15:06)
[Clang 12.0.5 (clang-1205.0.22.9)]OS / Environment
macOS Big Sur Version 11.6
Additional dependencies
No response
Pierre-Sassoulas
Metadata
Metadata
Assignees
Labels
False Negative 🦋No message is emitted but something is wrong with the codeNo message is emitted but something is wrong with the codeNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementation