Ref<PyType> (@NotNull PsiElement referenceTarget, @NotNull TypeEvalContext context, @Nullable PsiElement anchor) { PyType type = getBaseStringType(referenceTarget); if (type != null) { return Ref.create(type); } Ref<PyType> enumType = getEnumType(referenceTarget, context, anchor); if (enumType != null) { return enumType; } return null; }