From 03174d7a7a7a0773f45651a3cfb6f54f83000120 Mon Sep 17 00:00:00 2001 From: Koudai Aono Date: Tue, 28 Feb 2023 22:51:30 +0900 Subject: [PATCH] Remove unnecessary condition --- .../pydantic/PydanticDataclassTypeProvider.kt | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/com/koxudaxi/pydantic/PydanticDataclassTypeProvider.kt b/src/com/koxudaxi/pydantic/PydanticDataclassTypeProvider.kt index 90391ef2..c9faa09b 100644 --- a/src/com/koxudaxi/pydantic/PydanticDataclassTypeProvider.kt +++ b/src/com/koxudaxi/pydantic/PydanticDataclassTypeProvider.kt @@ -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) } }