more type checking imports
This commit is contained in:
parent
ae4d610754
commit
b4fd7c2080
1 changed files with 11 additions and 3 deletions
|
@ -13,11 +13,19 @@ from wiki_postbot.actions import Result
|
|||
from wiki_postbot.logger import init_logger
|
||||
from datetime import datetime
|
||||
import requests
|
||||
from discord.message import Message, Embed
|
||||
|
||||
import pdb
|
||||
|
||||
if TYPE_CHECKING:
|
||||
try:
|
||||
from wiki_postbot.clients.slack import SlackMessage
|
||||
except ImportError:
|
||||
SlackMessage = None
|
||||
try:
|
||||
from discord.message import Message, Embed
|
||||
except ImportError:
|
||||
Message = None
|
||||
Embed = None
|
||||
|
||||
# creds = Mediawiki_Creds.from_json('mediawiki_creds.json')
|
||||
|
||||
|
@ -153,7 +161,7 @@ class Wiki:
|
|||
)
|
||||
return result
|
||||
|
||||
def handle_discord(self, msg:Message) -> Result:
|
||||
def handle_discord(self, msg:'Message') -> Result:
|
||||
"""
|
||||
Not being precious about this, just implementing
|
||||
and will worry about generality later!
|
||||
|
|
Loading…
Reference in a new issue