coral-pi-rest-server icon indicating copy to clipboard operation
coral-pi-rest-server copied to clipboard

Use guard clauses

Open robmarkcole opened this issue 5 years ago • 0 comments

Use if flask.request.method != "POST" or not flask.request.files.get("image"):, do the negative. This saves indentation. Same for if not predictions

https://refactoring.com/catalog/replaceNestedConditionalWithGuardClauses.html

robmarkcole avatar Oct 02 '19 04:10 robmarkcole