Commit 69401bad authored by Alessia Marcolini's avatar Alessia Marcolini
Browse files

Black formatting

parent 83317576
......@@ -32,12 +32,14 @@ def find_model_using_name(model_name):
model = None
target_model_name = model_name.replace('_', '') + 'model'
for name, cls in modellib.__dict__.items():
if name.lower() == target_model_name.lower() \
and issubclass(cls, BaseModel):
if name.lower() == target_model_name.lower() and issubclass(cls, BaseModel):
model = cls
if model is None:
print("In %s.py, there should be a subclass of BaseModel with class name that matches %s in lowercase." % (model_filename, target_model_name))
print(
"In %s.py, there should be a subclass of BaseModel with class name that matches %s in lowercase."
% (model_filename, target_model_name)
)
exit(0)
return model
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment