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.
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