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:
parent
ecec9bf4a8
commit
4631d3dd1d
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
typing
|
17
wolfbot.py
17
wolfbot.py
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
import sys
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
import botconfig
|
import botconfig
|
||||||
|
|
||||||
@ -26,6 +27,22 @@ if sys.version_info < (3, 3):
|
|||||||
print("Python 3.3 or newer is required to run the bot.")
|
print("Python 3.3 or newer is required to run the bot.")
|
||||||
sys.exit(1)
|
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
|
from oyoyo.client import IRCClient
|
||||||
|
|
||||||
import src
|
import src
|
||||||
|
Loading…
Reference in New Issue
Block a user