void (@NotNull PyStarExpression node) { super.visitPyStarExpression(node); if (node.isAssignmentTarget()) { registerForAllMatchingVersions(level -> level.isPython2() && registerForLanguageLevel(level), PyPsiBundle.message("INSP.compatibility.feature.support.starred.expressions.as.assignment.targets"), node); } if (node.isUnpacking()) { registerForAllMatchingVersions(level -> level.isOlderThan(LanguageLevel.PYTHON35) && registerForLanguageLevel(level), PyPsiBundle.message("INSP.compatibility.feature.support.starred.expressions.in.tuples.lists.and.sets"), node); final PsiElement container = PsiTreeUtil.skipParentsOfType(node, PyParenthesizedExpression.class); if (container instanceof PyTupleExpression) { final PsiElement tupleParent = container.getParent(); if (tupleParent instanceof PyReturnStatement) { registerForAllMatchingVersions(level -> level.isAtLeast(LanguageLevel.PYTHON35) && level.isOlderThan(LanguageLevel.PYTHON38) && registerForLanguageLevel(level), PyPsiBundle.message("INSP.compatibility.feature.support.unpacking.without.parentheses.in.return.statements"), node); } if (tupleParent instanceof PyYieldExpression && !((PyYieldExpression)tupleParent).isDelegating()) { registerForAllMatchingVersions(level -> level.isAtLeast(LanguageLevel.PYTHON35) && level.isOlderThan(LanguageLevel.PYTHON38) && registerForLanguageLevel(level), PyPsiBundle.message("INSP.compatibility.feature.support.unpacking.without.parentheses.in.yield.statements"), node); } if (tupleParent instanceof PySubscriptionExpression) { registerForAllMatchingVersions(level -> level.isAtLeast(LanguageLevel.PYTHON35) && level.isOlderThan(LanguageLevel.PYTHON311) && registerForLanguageLevel(level), PyPsiBundle.message("INSP.compatibility.feature.support.starred.expressions.in.subscriptions"), node, new PyReplaceStarByUnpackQuickFix()); } } if (node.getParent() instanceof PySubscriptionExpression || node.getParent() instanceof PySliceItem) { registerForAllMatchingVersions(level -> level.isAtLeast(LanguageLevel.PYTHON35) && level.isOlderThan(LanguageLevel.PYTHON311) && registerForLanguageLevel(level), PyPsiBundle.message("INSP.compatibility.feature.support.starred.expressions.in.subscriptions"), node, new PyReplaceStarByUnpackQuickFix()); } } PsiElement parent = node.getParent(); if (parent instanceof PyAnnotation && StarAnnotator.isVariadicArg(parent.getParent())) { registerForAllMatchingVersions(level -> level.isOlderThan(LanguageLevel.PYTHON311) && registerForLanguageLevel(level), PyPsiBundle.message("INSP.compatibility.feature.support.starred.expressions.in.type.annotations"), node); } }