Set the ground up for static type checking

Not yet enforced, but soon, bot owners will be forced to install the
typing module.
This commit is contained in:
Vgr E. Barry 2016-08-13 11:43:05 -04:00
parent ecec9bf4a8
commit 4631d3dd1d
2 changed files with 18 additions and 0 deletions

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
typing

View File

@ -19,6 +19,7 @@
import traceback
import sys
import os
import botconfig
@ -26,6 +27,22 @@ if sys.version_info < (3, 3):
print("Python 3.3 or newer is required to run the bot.")
sys.exit(1)
try: # need to manually add dependencies here
pass #import typing
except ImportError:
command = "python3"
if os.name == "nt":
command = "py -3"
print("*** Missing dependencies! ***".center(80),
"Please install the missing dependencies by running the following command:",
"{0} -m pip install -r requirements.txt".format(command), "",
"If you don't have pip and don't know how to install it, follow this link:",
"https://pip.pypa.io/en/stable/installing/", "",
"If you need any further help with setting up and/or running the bot, we",
" will be happy to help you in ##werewolf-dev on irc.freenode.net",
"", "- The lykos developers", sep="\n")
sys.exit(1)
from oyoyo.client import IRCClient
import src