DRY error message three times
remove if(cond): if(cond) ...?!
remove repeated branch
make branches more similar
parameterise response
remove redundant if-branch
deduplicate if-branches
generalise arg passing
fix dynamic type error
shortcut else branch
shortcut else branch
remove redundant else clause in already shortcut else branch
break up long line
break up long line
DRY rendering
short cut else-branch
disambiguate variables
remove redundant if-else
DRY sql lookup
rm redundant parens, python-style