diff --git a/src/main/kotlin/space/whitememory/pythoninlayparams/types/hints/HintResolver.kt b/src/main/kotlin/space/whitememory/pythoninlayparams/types/hints/HintResolver.kt index b10c6a6..2be63c9 100644 --- a/src/main/kotlin/space/whitememory/pythoninlayparams/types/hints/HintResolver.kt +++ b/src/main/kotlin/space/whitememory/pythoninlayparams/types/hints/HintResolver.kt @@ -60,6 +60,12 @@ enum class HintResolver { typeEvalContext: TypeEvalContext, settings: PythonVariablesInlayTypeHintsProvider.Settings ): Boolean { + val assignedValue = PyUtil.peelArgument(element.findAssignedValue()) + + if (assignedValue is PyPrefixExpression) { + return shouldShowTypeHint(assignedValue.operand as PyElement, typeEvalContext) + } + return shouldShowTypeHint(element, typeEvalContext) } },