Skip to content

Commit e8deafd

Browse files
committed
"Fix" coroutines and incomplete functions
1 parent 780d0de commit e8deafd

File tree

1 file changed

+2
-0
lines changed
  • src/main/kotlin/space/whitememory/pythoninlayparams/types/hints

1 file changed

+2
-0
lines changed

src/main/kotlin/space/whitememory/pythoninlayparams/types/hints/HintResolver.kt

+2
Original file line numberDiff line numberDiff line change
@@ -450,9 +450,11 @@ enum class HintResolver {
450450

451451
if (
452452
typeAnnotation == null
453+
|| (element is PyFunction && element.isAsync) // TODO: Handle async functions properly
453454
|| (element is PyFunction && typeAnnotation is PyNoneType)
454455
|| ((element is PyFunction || element is PyTargetExpression) && (element as PyTypeCommentOwner).typeCommentAnnotation != null)
455456
|| (element is PyAnnotationOwner && element.annotation != null)
457+
|| (element is PyFunction && !element.textContains(":".single()))
456458
) {
457459
return false
458460
}

0 commit comments

Comments
 (0)