From 18d9875e805c0e1c210658e2c03e8ebeba1c6cd6 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Wed, 29 Nov 2023 16:10:47 -0800 Subject: [PATCH] Resolve circular import --- chatbot_core/utils/bot_utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/chatbot_core/utils/bot_utils.py b/chatbot_core/utils/bot_utils.py index 2573ea1..5adc7f9 100644 --- a/chatbot_core/utils/bot_utils.py +++ b/chatbot_core/utils/bot_utils.py @@ -46,8 +46,10 @@ from klat_connector import start_socket from chatbot_core.utils.logger import LOG + +# Causes circular imports # from chatbot_core import ChatBot -from chatbot_core.v2 import ChatBot as ChatBotV2 +# from chatbot_core.v2 import ChatBot as ChatBotV2 def get_ip_address(): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) @@ -650,7 +652,7 @@ def _find_bot_modules(): def run_mq_bot(chatbot_name: str, vhost: str = '/chatbots', - run_kwargs: dict = None, init_kwargs: dict = None) -> ChatBotV2: + run_kwargs: dict = None, init_kwargs: dict = None): """ Get an initialized MQ Chatbot instance @param chatbot_name: chatbot entrypoint name and configuration key