Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.1.0
-
None
Description
atlas_client/client/base_client.py looks a bit messy:
- There is no need to make conditions with mapping between HTTPMethod enum values and corresponding requests.Session methods - there is a requests.Session.request method which accepts HTTP method as argument
- There is no need to use elif in conditions if previous clauses are ended with return or raise statements
- There is not need to use logger.isEnabledFor(logging.DEBUG) before calling logger.debug, this is already done in .debug method itself
- Use logging, not print
- {{logging.exception}} already shows full exception traceback, no need to explicitly show add it into a logging message
I've creates pull request with a fix for all these items: