fixed PY-3476 Reported element PyDictLiteralExpression is not from the file

This commit is contained in:
Ekaterina Tuzova
2011-05-04 16:37:03 +04:00
parent a3894dce73
commit 3f155fd404
@@ -237,7 +237,7 @@ public class PyStringFormatInspection extends PyInspection {
if (myExpectedArguments > 0) {
if (myExpectedArguments == (expressions.length + additionalExpressions.size())) {
// probably "%s %s" % {'a':1, 'b':2}, with names forgotten in template
registerProblem(pyElement, PyBundle.message("INSP.format.requires.no.mapping"));
registerProblem(rightExpression, PyBundle.message("INSP.format.requires.no.mapping"));
}
else {
// "braces: %s" % {'foo':1} gives "braces: {'foo':1}", implicit str() kicks in