Sorting imports with isort, formatting the code style with black, resolving most reports from prospector analysis, such as: reduced the number of local variables (R0914); remove unused variable and imports; sat a timeout for requests.get, avoiding it to wait forever (and built a try-except block in case it does); finally, did some logic simplifications in if-else statments.
Sorting imports with
isort
, formatting the code style withblack
, resolving most reports fromprospector
analysis, such as: reduced the number of local variables (R0914); remove unused variable and imports; sat a timeout forrequests.get
, avoiding it to wait forever (and built a try-except block in case it does); finally, did some logic simplifications in if-else statments.