Cleaned code structure
This commit is contained in:
parent
79abc3fee3
commit
70149e9732
20 changed files with 196 additions and 332 deletions
|
|
@ -7,8 +7,14 @@ import sys
|
|||
import os
|
||||
import glob
|
||||
|
||||
from openflexure_microscope.common.labthings_core.utilities import get_docstring
|
||||
from openflexure_microscope.utilities import camel_to_snake, snake_to_spine
|
||||
from openflexure_microscope.common.labthings_core.utilities import (
|
||||
get_docstring,
|
||||
camel_to_snake,
|
||||
snake_to_spine,
|
||||
)
|
||||
|
||||
|
||||
# TODO: Move into core?
|
||||
|
||||
|
||||
class BaseExtension:
|
||||
|
|
@ -134,7 +140,7 @@ def find_instances_in_module(module, class_to_find):
|
|||
return objs
|
||||
|
||||
|
||||
def find_extensions_in_file(extension_path, module_name="extensions"):
|
||||
def find_extensions_in_file(extension_path: str, module_name="extensions"):
|
||||
logging.debug(f"Loading extensions from {extension_path}")
|
||||
|
||||
spec = util.spec_from_file_location(module_name, extension_path)
|
||||
|
|
@ -149,7 +155,7 @@ def find_extensions_in_file(extension_path, module_name="extensions"):
|
|||
return find_instances_in_module(mod, BaseExtension)
|
||||
|
||||
|
||||
def find_extensions(extension_dir, module_name="extensions"):
|
||||
def find_extensions(extension_dir: str, module_name="extensions"):
|
||||
logging.debug(f"Loading extensions from {extension_dir}")
|
||||
|
||||
extensions = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue