void (final @NotNull PyStringLiteralExpression node) { super.visitPyStringLiteralExpression(node); boolean seenBytes = false; boolean seenNonBytes = false; for (PyStringElement element : node.getStringElements()) { final String prefix = StringUtil.toUpperCase(element.getPrefix()); if (prefix.isEmpty()) continue; final boolean bytes = element.isBytes(); seenBytes |= bytes; seenNonBytes |= !bytes; final int elementStart = element.getTextOffset(); registerForAllMatchingVersions(level -> !getSupportedStringPrefixes(level).contains(prefix) && registerForLanguageLevel(level), PyPsiBundle.message("INSP.compatibility.feature.support.string.literal.prefix", prefix), node, TextRange.create(elementStart, elementStart + element.getPrefixLength()), true, new RemovePrefixQuickFix(prefix)); } if (seenBytes && seenNonBytes) { registerForAllMatchingVersions(level -> level.isPy3K() && registerForLanguageLevel(level), PyPsiBundle.message("INSP.compatibility.feature.allow.to.mix.bytes.and.non.bytes.literals"), node); } }