From 2d8028bbe172682e5e739f78b1029996b7a5d795 Mon Sep 17 00:00:00 2001 From: Tochilina Ekaterina Date: Thu, 16 Mar 2023 13:18:17 +0300 Subject: [PATCH] fix --- .../python/newtyping/ast/visitor/hints/HintCollector.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/utbot-python/src/main/kotlin/org/utbot/python/newtyping/ast/visitor/hints/HintCollector.kt b/utbot-python/src/main/kotlin/org/utbot/python/newtyping/ast/visitor/hints/HintCollector.kt index 7c39d9f422..2c7f973116 100644 --- a/utbot-python/src/main/kotlin/org/utbot/python/newtyping/ast/visitor/hints/HintCollector.kt +++ b/utbot-python/src/main/kotlin/org/utbot/python/newtyping/ast/visitor/hints/HintCollector.kt @@ -102,11 +102,13 @@ class HintCollector( } if (processIsinstanceCall(parsed, node)) return - val type = mypyTypes[parsed.function.beginOffset to parsed.function.endOffset] - val typeDescription = type?.getPythonAttributeByName( + val rawType = mypyTypes[parsed.function.beginOffset to parsed.function.endOffset] + val attr = rawType?.getPythonAttributeByName( storage, "__call__" - )?.type?.pythonDescription() + ) + val type = attr?.type + val typeDescription = type?.pythonDescription() val callType = createPythonCallableType( parsed.args.size, List(parsed.args.size) { PythonCallableTypeDescription.ArgKind.ARG_POS },