void (@NotNull NewStyleSubstitutionChunk chunk, @NotNull String mappingKey) { final PsiElement target = new PySubstitutionChunkReference(myFormatExpression, chunk).resolve(); boolean hasElementIndex = chunk.getMappingKeyElementIndex() != null; if (target == null) { final String chunkMapping = chunk.getMappingKey(); if (chunkMapping != null) { registerProblem(myFormatExpression, hasElementIndex ? PyPsiBundle.message("INSP.too.few.args.for.fmt.string") : PyPsiBundle.message("INSP.str.format.key.has.no.argument", chunkMapping)); } else { registerProblem(myFormatExpression, PyPsiBundle.message("INSP.too.few.args.for.fmt.string")); } } else { checkTypesCompatibleForCheckedTypesOnly(myFormatExpression, target, mappingKey); } }