@@ -72,7 +72,7 @@ def item_not_found(self, item_type: str, item_name: str) -> None:
72
72
73
73
class ConsoleView (View ):
74
74
"""The View is the presentation layer of the application."""
75
- def show_item_list (self , item_type : str , item_list : list ) -> None :
75
+ def show_item_list (self , item_type : str , item_list : dict [ any , any ] ) -> None :
76
76
print (item_type .upper () + " LIST:" )
77
77
for item in item_list :
78
78
print (item )
@@ -118,7 +118,6 @@ def show_item_information(self, item_name: str) -> None:
118
118
item_type : str = self .model .item_type
119
119
self .view .item_not_found (item_type , item_name )
120
120
else :
121
- item_type : str = self .model .item_type
122
121
self .view .show_item_information (item_type , item_name , item_info )
123
122
124
123
@@ -127,7 +126,12 @@ class Router:
127
126
def __init__ (self ):
128
127
self .routes = {}
129
128
130
- def register (self , path : str , controller_class : type [Controller ], model_class : type [Model ], view_class : type [View ]) -> None :
129
+ def register (
130
+ self ,
131
+ path : str ,
132
+ controller_class : type [Controller ],
133
+ model_class : type [Model ],
134
+ view_class : type [View ]) -> None :
131
135
model_instance : Model = model_class ()
132
136
view_instance : View = view_class ()
133
137
self .routes [path ] = controller_class (model_instance , view_instance )
0 commit comments