DMTF / Redfish-Service-Validator

The Redfish Service Validator is a Python3 tool for checking conformance of any "device" with a Redfish service interface against Redfish CSDL schema
Other
38 stars 33 forks source link

Remove conditional imports #510

Closed edtanous closed 1 year ago

edtanous commented 1 year ago

Conditional imports, while useful in a minor way to save ram, lead to situations where dependencies are harder to trace, and migrations are harder to execute.

Python pep8 also says: "Imports are always put at the top of the file, just after any module comments and docstrings, and before module globals and constants." https://peps.python.org/pep-0008/#imports

We should follow that advice. This commit moves all imports to be at the top of the file.

Signed-off-by: Ed Tanous edtanous@google.com

mraineri commented 1 year ago

Approved 8/5