Closed LoopThrough-i-j closed 3 years ago
@neiljp thanks for pointing out some improvements. I had actually added inherited the BotHandler
class and added some helper functions in the BotHandler
, confused by the innumerable number of errors thrown by the bots after the 2nd commit, which I slowly debugged and figured out and then considered keeping the BotHandler
the same.
In order to use this in zulip/zulip, we also need to adjust zulip_bots.lib.extract_query_without_mention
to take BotHandler
instead of ExternalBotHandler
. There may be other such adjustments that make sense.
In order to use this in zulip/zulip, we also need to adjust
zulip_bots.lib.extract_query_without_mention
to takeBotHandler
instead ofExternalBotHandler
. There may be other such adjustments that make sense.
Thanks, I didn't know. Will get things fixed soon.
zulip-bots: Add
CommonStorage
Protocol.CommonStorage
Protocol is created to add a Common type to all Storage Classes.BotHandler
s are typed asCommonStorage
Note: Protocol is imported from
typing_extensions
astyping
doesn't provide Protocol for python <= 3.7.zulip-bots: Add
BotHandler
Protocol.The
BotHandler
Protocol has methods which allow any of the Current BotHandlers to useBotHandler
Protocol as a mypy type.Fixes part of #639
zulip-bots: Set
bot_handler
type toBotHandler
.bot_handler
type toBotHandler
.Fixes #639