summaryrefslogtreecommitdiff
path: root/checkers/strings.py
diff options
context:
space:
mode:
authorClaudiu Popa <cpopa@cloudbasesolutions.com>2015-01-30 01:44:56 +0200
committerClaudiu Popa <cpopa@cloudbasesolutions.com>2015-01-30 01:44:56 +0200
commitdbbe62360ea221f814e19da94e21936a29bad88b (patch)
tree00cbe78bdf9cb27052b2bd3a981a5dfea40bbe5f /checkers/strings.py
parentc54b93fa0679e1e457451ef6baa048d7878b537b (diff)
downloadpylint-git-dbbe62360ea221f814e19da94e21936a29bad88b.tar.gz
Fix a false positive with `too-few-format-args` warning.
The warning was emitted when the string format contained a normal positional argument ('{0}'), mixed with a positional argument which did an attribute access ('{0.__class__}'). Closes issue #463.
Diffstat (limited to 'checkers/strings.py')
-rw-r--r--checkers/strings.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/checkers/strings.py b/checkers/strings.py
index e88085d44..8892c2cc0 100644
--- a/checkers/strings.py
+++ b/checkers/strings.py
@@ -181,7 +181,7 @@ def parse_format_method_string(format_string):
if isinstance(keyname, numbers.Number):
# In Python 2 it will return long which will lead
# to different output between 2 and 3
- manual_pos_arg.add(keyname)
+ manual_pos_arg.add(str(keyname))
keyname = int(keyname)
keys.append((keyname, list(fielditerator)))
else: