File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ def _load_py_cssfproject(cls, project_path: Path) -> Self:
224224 project_module = importlib .util .module_from_spec (spec )
225225 spec .loader .exec_module (project_module )
226226
227- project_object : CSSFProject = getattr (project_module , "__project__" , None )
227+ project_object = getattr (project_module , "__project__" , None )
228228
229229 if project_object is None :
230230 msg = (
@@ -233,6 +233,14 @@ def _load_py_cssfproject(cls, project_path: Path) -> Self:
233233 )
234234 raise ImportError (msg )
235235
236+ if not isinstance (project_object , cls ):
237+ msg = (
238+ f"Expected CSSFProject object in '__project__' field in { project_path } ."
239+ )
240+ raise TypeError (
241+ msg ,
242+ )
243+
236244 if not isinstance (project_object , cls ):
237245 msg = (
238246 "Incorrect object in '__project__' field, should contain "
You can’t perform that action at this time.
0 commit comments