Commit 07e64267 authored by Gustaf Ahdritz's avatar Gustaf Ahdritz
Browse files

Standardize code style

parent de07730f
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -3,12 +3,14 @@ import glob ...@@ -3,12 +3,14 @@ import glob
import importlib as importlib import importlib as importlib
_files = glob.glob(os.path.join(os.path.dirname(__file__), "*.py")) _files = glob.glob(os.path.join(os.path.dirname(__file__), "*.py"))
__all__ = [os.path.basename(f)[:-3] for f in _files if os.path.isfile(f) and not f.endswith("__init__.py")] __all__ = [
_modules = [(m, importlib.import_module('.' + m, __name__)) for m in __all__] os.path.basename(f)[:-3]
for f in _files
if os.path.isfile(f) and not f.endswith("__init__.py")
]
_modules = [(m, importlib.import_module("." + m, __name__)) for m in __all__]
for _m in _modules: for _m in _modules:
globals()[_m[0]] = _m[1] globals()[_m[0]] = _m[1]
# Avoid needlessly cluttering the global namespace # Avoid needlessly cluttering the global namespace
del _files, _m, _modules del _files, _m, _modules
This diff is collapsed.
...@@ -3,13 +3,14 @@ import glob ...@@ -3,13 +3,14 @@ import glob
import importlib as importlib import importlib as importlib
_files = glob.glob(os.path.join(os.path.dirname(__file__), "*.py")) _files = glob.glob(os.path.join(os.path.dirname(__file__), "*.py"))
__all__ = [os.path.basename(f)[:-3] for f in _files if os.path.isfile(f) and not f.endswith("__init__.py")] __all__ = [
_modules = [(m, importlib.import_module('.' + m, __name__)) for m in __all__] os.path.basename(f)[:-3]
for f in _files
if os.path.isfile(f) and not f.endswith("__init__.py")
]
_modules = [(m, importlib.import_module("." + m, __name__)) for m in __all__]
for _m in _modules: for _m in _modules:
globals()[_m[0]] = _m[1] globals()[_m[0]] = _m[1]
# Avoid needlessly cluttering the global namespace # Avoid needlessly cluttering the global namespace
del _files, _m, _modules del _files, _m, _modules
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -3,13 +3,14 @@ import glob ...@@ -3,13 +3,14 @@ import glob
import importlib as importlib import importlib as importlib
_files = glob.glob(os.path.join(os.path.dirname(__file__), "*.py")) _files = glob.glob(os.path.join(os.path.dirname(__file__), "*.py"))
__all__ = [os.path.basename(f)[:-3] for f in _files if os.path.isfile(f) and not f.endswith("__init__.py")] __all__ = [
_modules = [(m, importlib.import_module('.' + m, __name__)) for m in __all__] os.path.basename(f)[:-3]
for f in _files
if os.path.isfile(f) and not f.endswith("__init__.py")
]
_modules = [(m, importlib.import_module("." + m, __name__)) for m in __all__]
for _m in _modules: for _m in _modules:
globals()[_m[0]] = _m[1] globals()[_m[0]] = _m[1]
# Avoid needlessly cluttering the global namespace # Avoid needlessly cluttering the global namespace
del _files, _m, _modules del _files, _m, _modules
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment