Skip to content

Commit

Permalink
Remove unnecessary condition
Browse files Browse the repository at this point in the history
  • Loading branch information
koxudaxi committed Feb 28, 2023
1 parent 20d346a commit 03174d7
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/com/koxudaxi/pydantic/PydanticDataclassTypeProvider.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,6 @@ class PydanticDataclassTypeProvider : PyTypeProviderBase() {
return when {
referenceTarget is PyClass && referenceTarget.isPydanticDataclass ->
getPydanticDataclassType(referenceTarget, context, anchor as? PyCallExpression, true)

referenceTarget is PyTargetExpression -> (referenceTarget as? PyTypedElement)
?.getType(context)?.pyClassTypes
?.filter { pyClassType -> pyClassType.pyClass.isPydanticDataclass }
?.firstNotNullOfOrNull { pyClassType ->
getPydanticDataclassType(
pyClassType.pyClass,
context,
anchor as? PyCallExpression,
pyClassType.isDefinition
)
}
else ->null
}?.let { Ref.create(it) }
}
Expand Down

0 comments on commit 03174d7

Please sign in to comment.