fix: model import isolation

This commit is contained in:
zhayujie
2023-02-21 00:02:39 +08:00
parent 01d0af841d
commit bca0939c9d
2 changed files with 3 additions and 5 deletions

View File

@@ -2,10 +2,6 @@
channel factory
"""
from channel.wechat.wechat_channel import WechatChannel
from channel.wechat.wechaty_channel import WechatyChannel
def create_channel(channel_type):
"""
create a channel instance
@@ -13,7 +9,9 @@ def create_channel(channel_type):
:return: channel instance
"""
if channel_type == 'wx':
from channel.wechat.wechat_channel import WechatChannel
return WechatChannel()
elif channel_type == 'wxy':
from channel.wechat.wechaty_channel import WechatyChannel
return WechatyChannel()
raise RuntimeError