Beispiel #1
0
 def topic(cls):
     if not cls._topic:
         cls_name = cls.__name__
         if cls_name.endswith('Message'):
             cls_name = cls_name[:-len('Message')]
         topic_name = utils.printable_name(cls_name, code_style=True).replace(' ', '.')
     else:
         topic_name = cls._topic
     return topic_name.lower()
 def _get_topic_from(classname):
     if classname.endswith('Message'):
         classname = classname[:-len('Message')]
     return utils.printable_name(classname,
                                 code_style=True).replace(' ', '.')
Beispiel #3
0
 def _get_topic_from(classname):
     if classname.endswith('Message'):
         classname = classname[:-len('Message')]
     return utils.printable_name(classname, code_style=True).replace(' ', '.')