summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorcpopa <devnull@localhost>2014-07-29 14:56:19 +0300
committercpopa <devnull@localhost>2014-07-29 14:56:19 +0300
commitda03d60582b624729f578f0b6dfa0c2c08184c7f (patch)
tree16ec5d7f159179ec7f33a8ff49f2cc7c28607d51 /test
parentbe5921dd65f379f2dbdbd0f32d546bde9d517403 (diff)
downloadpylint-da03d60582b624729f578f0b6dfa0c2c08184c7f.tar.gz
Fix a false positive with string formatting checker, when using keyword argument packing. Closes issue #288.
Diffstat (limited to 'test')
-rw-r--r--test/input/func_string_format_py27.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/input/func_string_format_py27.py b/test/input/func_string_format_py27.py
index 38eafd1..e2bfe12 100644
--- a/test/input/func_string_format_py27.py
+++ b/test/input/func_string_format_py27.py
@@ -78,3 +78,11 @@ def pprint_bad():
print "{0.missing}".format(2)
print "{0} {1} {2}".format(1, 2)
print "{0} {1}".format(1, 2, 3)
+
+def good_issue288(*args, **kwargs):
+ """ Test that using kwargs does not emit a false
+ positive.
+ """
+ data = 'Hello John Doe {0[0]}'.format(args)
+ print data
+ return 'Hello {0[name]}'.format(kwargs)