Language (@NotNull PsiElement context) { if (context instanceof PyStringLiteralExpression expr) { final TypeEvalContext typeEvalContext = TypeEvalContext.codeAnalysis(expr.getProject(), expr.getContainingFile()); if (isTypingLiteralArgument(expr, typeEvalContext) || isTypingAnnotatedMetadataArgument(expr, typeEvalContext)) { return null; } if (PsiTreeUtil.getParentOfType(context, PyAnnotation.class, true, PyCallExpression.class) != null && isTypingAnnotation(expr.getStringValue())) { return PyTypeHintDialect.INSTANCE; } if (isInsideValueOfExplicitTypeAnnotation(expr)) { return PyTypeHintDialect.INSTANCE; } } return null; }