@@ -78,10 +78,10 @@ def loadClasses(folder: str, packageName: str, classType: type) -> list[type]:
7878 else package .__name__
7979 packageVersion = getattr (package , "__version__" , None )
8080 packagePath = os .path .dirname (package .__file__ )
81- except Exception as e :
82- tb = traceback .extract_tb (e .__traceback__ )
81+ except Exception as exc :
82+ tb = traceback .extract_tb (exc .__traceback__ )
8383 last_call = tb [- 1 ]
84- logging .warning (f' * Failed to load package "{ packageName } " from folder "{ resolvedFolder } " ({ type (e ).__name__ } ): { str (e )} \n '
84+ logging .warning (f' * Failed to load package "{ packageName } " from folder "{ resolvedFolder } " ({ type (exc ).__name__ } ): { str (exc )} \n '
8585 # filename:lineNumber functionName
8686 f'{ last_call .filename } :{ last_call .lineno } { last_call .name } \n '
8787 # line of code with the error
@@ -114,18 +114,18 @@ def loadClasses(folder: str, packageName: str, classType: type) -> list[type]:
114114 if classType == desc .BaseNode :
115115 nodePlugin = NodePlugin (p )
116116 if nodePlugin .errors :
117- errors .append (" * {}: The following parameters do not have valid " \
118- "default values/ranges: {}" . format ( pluginName , ", " .join (nodePlugin .errors )) )
117+ errors .append (f " * { pluginName } : The following parameters do not have valid "
118+ f "default values/ranges: { ', ' .join (nodePlugin .errors )} " )
119119 classes .append (nodePlugin )
120120 else :
121121 classes .append (p )
122- except Exception as e :
122+ except Exception as exc :
123123 if classType == BaseSubmitter :
124124 logging .warning (f" Could not load submitter { pluginName } from package '{ package .__name__ } '" )
125125 else :
126- tb = traceback .extract_tb (e .__traceback__ )
126+ tb = traceback .extract_tb (exc .__traceback__ )
127127 last_call = tb [- 1 ]
128- errors .append (f' * { pluginName } ({ type (e ).__name__ } ): { e } \n '
128+ errors .append (f' * { pluginName } ({ type (exc ).__name__ } ): { exc } \n '
129129 # filename:lineNumber functionName
130130 f'{ last_call .filename } :{ last_call .lineno } { last_call .name } \n '
131131 # line of code with the error
0 commit comments