MCPcopy Create free account
hub / github.com/ehForwarderBot/ehForwarderBot / get_instance_display_name

Method get_instance_display_name

ehforwarderbot/wizard.py:172–191  ·  view source on GitHub ↗
(self, cid)

Source from the content-addressed store, hash-verified

170 return mid, iid
171
172 def get_instance_display_name(self, cid):
173 if not cid:
174 return cid
175 mid, iid = self.split_cid(cid)
176 if mid not in self.modules:
177 if iid:
178 return _("Unknown/custom module (instance: {instance})").format(
179 iid
180 )
181 else:
182 return _("Unknown/custom module")
183 else:
184 if iid:
185 name = _("{channel} (instance: {instance})").format(
186 channel=self.modules[mid].name,
187 instance=iid
188 )
189 else:
190 name = self.modules[mid].name
191 return name
192
193 def has_wizard(self, cid):
194 mid, _ = self.split_cid(cid)

Callers 6

mainFunction · 0.95
choose_slave_channelsFunction · 0.80
choose_middlewaresFunction · 0.80
confirmationFunction · 0.80

Calls 1

split_cidMethod · 0.95

Tested by

no test coverage detected