mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 04:51:24 +07:00
PY-86493 performance optimisation
GitOrigin-RevId: c3e746f880f1eaf2af290d9cf082ea2086748fa7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d9fd0403fd
commit
fb7e584af5
@@ -15,6 +15,7 @@ import com.jetbrains.python.codeInsight.typing.PyTypedDictTypeProvider.Companion
|
||||
import com.jetbrains.python.codeInsight.typing.PyTypingTypeProvider
|
||||
import com.jetbrains.python.documentation.PythonDocumentationProvider
|
||||
import com.jetbrains.python.psi.LanguageLevel
|
||||
import com.jetbrains.python.psi.PyAnnotation
|
||||
import com.jetbrains.python.psi.PyArgumentList
|
||||
import com.jetbrains.python.psi.PyAssignmentStatement
|
||||
import com.jetbrains.python.psi.PyBoolLiteralExpression
|
||||
@@ -62,6 +63,10 @@ class PyTypedDictInspection : PyInspection() {
|
||||
private class Visitor(holder: ProblemsHolder, context: TypeEvalContext) : PyInspectionVisitor(holder, context) {
|
||||
|
||||
override fun visitPySubscriptionExpression(node: PySubscriptionExpression) {
|
||||
if (node.parent is PyAnnotation) {
|
||||
// Do not check it in TypeHints
|
||||
return
|
||||
}
|
||||
val operandType = myTypeEvalContext.getType(node.operand)
|
||||
if (operandType !is PyTypedDictType) return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user