mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix PY-19699 False positive "Too few arguments for format string" on *imported* tuple: don't inspect expression with not-inferred type
This commit is contained in:
@@ -219,7 +219,8 @@ public class PyStringFormatInspection extends PyInspection {
|
||||
final PyType stringType = PyBuiltinCache.getInstance(rightExpression).getStringType(LanguageLevel.forElement(rightExpression));
|
||||
final PyType listType = PyBuiltinCache.getInstance(rightExpression).getListType();
|
||||
|
||||
if (type == null || PyTypeChecker.match(listType, type, myTypeEvalContext)
|
||||
if (type == null) return -1;
|
||||
if (PyTypeChecker.match(listType, type, myTypeEvalContext)
|
||||
|| PyTypeChecker.match(stringType, type, myTypeEvalContext)) {
|
||||
checkTypeCompatible(problemTarget, builtinCache.getStrType(),
|
||||
PyTypeParser.getTypeByName(problemTarget, s));
|
||||
|
||||
Reference in New Issue
Block a user