Queer European MD passionate about IT
浏览代码

Relative imports use now dots

Davte 5 年之前
父节点
当前提交
81fba8546e
共有 2 个文件被更改,包括 6 次插入6 次删除
  1. 5 5
      ciclopibot/bot.py
  2. 1 1
      ciclopibot/helper.py

+ 5 - 5
ciclopibot/bot.py

@@ -9,11 +9,11 @@ import sys
 from davtelepot.bot import Bot
 
 # Project modules
-import bot_tools
-import ciclopi
-from data.passwords import bot_token
-import helper
-import roles
+from . import bot_tools
+from . import ciclopi
+from . import helper
+from . import roles
+from .data.passwords import bot_token
 
 if __name__ == '__main__':
     path = os.path.dirname(__file__)

+ 1 - 1
ciclopibot/helper.py

@@ -7,7 +7,7 @@ from davtelepot.utilities import (
 )
 
 # Project modules
-import roles
+from . import roles
 
 DENY_MESSAGE = (
     "Chiedi di essere autorizzato: se la tua richiesta verrà accolta, "