summaryrefslogtreecommitdiff
path: root/checkers
diff options
context:
space:
mode:
authorClaudiu Popa <cpopa@cloudbasesolutions.com>2014-11-11 12:01:22 +0200
committerClaudiu Popa <cpopa@cloudbasesolutions.com>2014-11-11 12:01:22 +0200
commit763227ac92379c4f574fbd359b5ab7eed2eb51df (patch)
tree317cc957430def28765b1983f246e939d693f0db /checkers
parentfe55e6fea908bd5548d41b45312f6c8b15196db9 (diff)
downloadpylint-git-763227ac92379c4f574fbd359b5ab7eed2eb51df.tar.gz
Don't try to analyze string formatting with objects coming from function arguments. Closes issue #373.
Diffstat (limited to 'checkers')
-rw-r--r--checkers/strings.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/checkers/strings.py b/checkers/strings.py
index f603e80af..d4b2e65d1 100644
--- a/checkers/strings.py
+++ b/checkers/strings.py
@@ -453,12 +453,9 @@ class StringMethodsChecker(BaseChecker):
# use attribute / item access
continue
if argument.parent and isinstance(argument.parent, astroid.Arguments):
- # Check to see if our argument is kwarg or vararg,
- # and skip the check for this argument if so, because when inferring,
- # astroid will return empty objects (dicts and tuples) and
- # that can lead to false positives.
- if argname.name in (argument.parent.kwarg, argument.parent.vararg):
- continue
+ # Ignore any object coming from an argument,
+ # because we can't infer its value properly.
+ continue
previous = argument
parsed = []
for is_attribute, specifier in specifiers: