diff options
| author | cpopa <devnull@localhost> | 2014-07-29 02:41:50 +0300 |
|---|---|---|
| committer | cpopa <devnull@localhost> | 2014-07-29 02:41:50 +0300 |
| commit | be5921dd65f379f2dbdbd0f32d546bde9d517403 (patch) | |
| tree | aa99472002b527de43ee2befab8755eed7f444fa /test | |
| parent | d4b715c69ae9ac2da43f555e3d92b7339a96e368 (diff) | |
| download | pylint-be5921dd65f379f2dbdbd0f32d546bde9d517403.tar.gz | |
Fix a false positive with string formatting checker, when encountering a string which uses only position-based arguments. Closes issue #285.
Diffstat (limited to 'test')
| -rw-r--r-- | test/input/func_string_format_py27.py | 2 | ||||
| -rw-r--r-- | test/messages/func_string_format_py27.txt | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/test/input/func_string_format_py27.py b/test/input/func_string_format_py27.py index d2f5599..38eafd1 100644 --- a/test/input/func_string_format_py27.py +++ b/test/input/func_string_format_py27.py @@ -76,3 +76,5 @@ def pprint_bad(): print "{a[0]}".format(a=object)
print log("{}".format(2, "info"))
print "{0.missing}".format(2)
+ print "{0} {1} {2}".format(1, 2)
+ print "{0} {1}".format(1, 2, 3)
diff --git a/test/messages/func_string_format_py27.txt b/test/messages/func_string_format_py27.txt index 56f8c41..c94e953 100644 --- a/test/messages/func_string_format_py27.txt +++ b/test/messages/func_string_format_py27.txt @@ -3,6 +3,8 @@ E: 64:pprint_bad: Not enough arguments for format string E: 65:pprint_bad: Too many arguments for format string
E: 67:pprint_bad: Not enough arguments for format string
E: 77:pprint_bad: Too many arguments for format string
+E: 79:pprint_bad: Not enough arguments for format string
+E: 80:pprint_bad: Too many arguments for format string
W: 59:pprint_bad: Invalid format string
W: 60:pprint_bad: Invalid format string
W: 61:pprint_bad: Format string contains both automatic field numbering and manual field specification
|
