Run black reformatter on code
This commit is contained in:
parent
4582eb4085
commit
bd3e31bf3c
178 changed files with 4511 additions and 3385 deletions
|
|
@ -50,16 +50,20 @@ def protfunc_callable_protkey(*args, **kwargs):
|
|||
prot_value = prototype[fieldname]
|
||||
else:
|
||||
# check if it's an attribute
|
||||
for attrtuple in prototype.get('attrs', []):
|
||||
for attrtuple in prototype.get("attrs", []):
|
||||
if attrtuple[0] == fieldname:
|
||||
prot_value = attrtuple[1]
|
||||
break
|
||||
else:
|
||||
raise AttributeError(f"{fieldname} not found in prototype\n{prototype}\n"
|
||||
"(neither as prototype-field or as an Attribute")
|
||||
raise AttributeError(
|
||||
f"{fieldname} not found in prototype\n{prototype}\n"
|
||||
"(neither as prototype-field or as an Attribute"
|
||||
)
|
||||
if callable(prot_value):
|
||||
raise RuntimeError(f"Error in prototype\n{prototype}\n$protkey can only reference static "
|
||||
f"values/attributes (found {prot_value})")
|
||||
raise RuntimeError(
|
||||
f"Error in prototype\n{prototype}\n$protkey can only reference static "
|
||||
f"values/attributes (found {prot_value})"
|
||||
)
|
||||
try:
|
||||
return funcparser.funcparser_callable_eval(prot_value, **kwargs)
|
||||
except funcparser.ParsingError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue