diff options
Diffstat (limited to 'python/python-psi-impl/src/com/jetbrains/python/inspections/PyTypedDictInspection.kt')
-rw-r--r-- | python/python-psi-impl/src/com/jetbrains/python/inspections/PyTypedDictInspection.kt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/python/python-psi-impl/src/com/jetbrains/python/inspections/PyTypedDictInspection.kt b/python/python-psi-impl/src/com/jetbrains/python/inspections/PyTypedDictInspection.kt index a1f2cddd90ee..a1f6853ecbde 100644 --- a/python/python-psi-impl/src/com/jetbrains/python/inspections/PyTypedDictInspection.kt +++ b/python/python-psi-impl/src/com/jetbrains/python/inspections/PyTypedDictInspection.kt @@ -277,7 +277,9 @@ class PyTypedDictInspection : PyInspection() { private fun checkValueIsAType(expression: PyExpression?, strType: String?) { if (expression !is PyReferenceExpression && expression !is PySubscriptionExpression && - expression !is PyNoneLiteralExpression || strType == null) { + expression !is PyNoneLiteralExpression && + expression !is PyBinaryExpression && + expression !is PyStringLiteralExpression || strType == null) { registerProblem(expression, PyPsiBundle.message("INSP.typeddict.value.must.be.type"), ProblemHighlightType.WEAK_WARNING) return } |