@@ -43,14 +43,14 @@ def ParseArgs(self):
4343 except Exception as error :
4444 Log .Fail (f"Options parsing failed: { error } " , True )
4545
46- def GetCommand (self , name ):
47- command = self .SearchCommand (name , f"{ path .dirname (path .abspath (__file__ ))} /commands/" )
46+ def GetCommand (self , name ) -> Command :
47+ command : Command = self .SearchCommand (name , f"{ path .dirname (path .abspath (__file__ ))} /commands/" )
4848 if not command :
4949 raise Exception (f"invalid command name: \" { name } \" ." )
5050
5151 return command
5252
53- def SearchCommand (self , name : str , path : str ):
53+ def SearchCommand (self , name : str , path : str ) -> Command :
5454 for dirpath , dirnames , filenames in walk (path ):
5555 for filename in filenames :
5656 if filename .endswith (".py" ) and filename != "__init__.py" :
@@ -62,7 +62,7 @@ def SearchCommand(self, name: str, path: str):
6262 try :
6363 spec .loader .exec_module (module )
6464 for cmdName in dir (module ):
65- command = getattr (module , cmdName )
65+ command : Command = getattr (module , cmdName )
6666 if (isclass (command ) and
6767 not isabstract (command ) and
6868 issubclass (command , Command ) and
0 commit comments