File tree 1 file changed +4
-5
lines changed
src/main/kotlin/space/whitememory/pythoninlayparams/types/hints
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -66,21 +66,20 @@ enum class HintResolver {
66
66
// Handle case 'var = await async_func()` which return `Coroutine` inside
67
67
if (assignedValue is PyPrefixExpression && assignedValue.operator == PyTokenTypes .AWAIT_KEYWORD ) return true
68
68
69
- if (typeAnnotation is PyClassType && isElementInsideTypingModule(typeAnnotation.pyClass)) return false
70
-
71
-
72
69
if (assignedValue is PySubscriptionExpression ) {
73
70
assignedValue.rootOperand.reference?.resolve()?.let {
74
- if ( isElementInsideTypingModule(it as PyElement )) return false
71
+ return ! isElementInsideTypingModule(it as PyElement )
75
72
}
76
73
}
77
74
78
75
if (assignedValue is PyReferenceExpression ) {
79
76
assignedValue.reference.resolve()?.let {
80
- if ( isElementInsideTypingModule(it as PyElement )) return false
77
+ return ! isElementInsideTypingModule(it as PyElement )
81
78
}
82
79
}
83
80
81
+ if (typeAnnotation is PyClassType && isElementInsideTypingModule(typeAnnotation.pyClass)) return false
82
+
84
83
return true
85
84
}
86
85
},
You can’t perform that action at this time.
0 commit comments