]> kaliko git repositories - sid.git/blobdiff - sid/sid.py
Use __url__ in help message
[sid.git] / sid / sid.py
index fadb79e172ec77de117f9b2696f13d437f5fa6ee..b9c7df71c55373cfaa989f8ef5582a576ab9fa4d 100644 (file)
@@ -23,6 +23,8 @@ import traceback
 
 import slixmpp
 
+from sid import __url__
+
 
 def botcmd(*args, **kwargs):
     """Decorator for bot command functions
@@ -62,6 +64,9 @@ class MUCBot(slixmpp.ClientXMPP):
                  log_level=logging.INFO):
         super(MUCBot, self).__init__(jid, password)
 
+        # Clean sphinx autodoc for self documentation
+        # (cf. MUCBot.help)
+        self.__doc__ = None
         self.log = logging.getLogger(__package__)
         self.plugins = list()
         self.commands = dict()
@@ -188,8 +193,8 @@ class MUCBot(slixmpp.ClientXMPP):
 
         Automatically assigned to the "help" command."""
         help_cmd = ('Type {}help <command name>'.format(self.prefix) +
-                    ' to get more info about that specific command.\n\n'+
-                    'SRC: http://git.kaliko.me/sid.git')
+                    ' to get more info about that specific command.\n\n' +
+                    f'SRC: {__url__}')
         if not args:
             if self.__doc__:
                 description = self.__doc__.strip()