fossasia / susi_linux

Hardware for SUSI AI https://susi.ai
Apache License 2.0
1.61k stars 148 forks source link

very very minor change #498

Closed xeon-zolt closed 5 years ago

xeon-zolt commented 5 years ago

changed an if else condition to a one-liner

Fixes #

Checklist

Test Passing

Short description of what this resolves:

just converted if else to a oneliner

Changes proposed in this pull request:

reduced no of lines in the code

hongquan commented 5 years ago

I don't understand why you have to write:

return [False, True][api_response.status_code == 200]

Isn't this better:

return (api_response.status_code == 200)
xeon-zolt commented 5 years ago

I was reading the code and just thought why not

sansyrox commented 5 years ago

Didn't read @hongquan 's suggestion before approval. Either one looks good to me.

norbusan commented 5 years ago

Please use

return (api_response.status_code == 200)

the index arraying approach is unreadable!

norbusan commented 5 years ago

Thanks, merged.