MCPcopy Index your code
hub / github.com/faif/python-patterns / show_item_information

Method show_item_information

patterns/structural/mvc.py:120–131  ·  view source on GitHub ↗

Show information about a {item_type} item. :param str item_name: the name of the {item_type} item to show information about

(self, item_name: str)

Source from the content-addressed store, hash-verified

118 self.view.show_item_list(item_type, items)
119
120 def show_item_information(self, item_name: str) -> None:
121 """
122 Show information about a {item_type} item.
123 :param str item_name: the name of the {item_type} item to show information about
124 """
125 item_type: str = self.model.item_type
126 try:
127 item_info: dict = self.model.get(item_name)
128 except Exception:
129 self.view.item_not_found(item_type, item_name)
130 else:
131 self.view.show_item_information(item_type, item_name, item_info)
132
133
134class Router:

Calls 3

getMethod · 0.45
item_not_foundMethod · 0.45
show_item_informationMethod · 0.45