Inventory spec: make system optional
This commit is contained in:
@@ -5,7 +5,7 @@ package schema
|
|||||||
description?: string,
|
description?: string,
|
||||||
icon?: string
|
icon?: string
|
||||||
tags: [...string]
|
tags: [...string]
|
||||||
system: string
|
system?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
#role: string
|
#role: string
|
||||||
|
|||||||
@@ -75,10 +75,6 @@ def load_dataclass_from_file(
|
|||||||
module_name = (
|
module_name = (
|
||||||
os.path.relpath(file_path, root_dir).replace(os.path.sep, ".").rstrip(".py")
|
os.path.relpath(file_path, root_dir).replace(os.path.sep, ".").rstrip(".py")
|
||||||
)
|
)
|
||||||
# spec = importlib.util.spec_from_file_location(module_name, file_path)
|
|
||||||
# module = importlib.util.module_from_spec(spec)
|
|
||||||
# spec.loader.exec_module(module)
|
|
||||||
# breakpoint()
|
|
||||||
try:
|
try:
|
||||||
sys.path.insert(0, root_dir)
|
sys.path.insert(0, root_dir)
|
||||||
spec = importlib.util.spec_from_file_location(module_name, file_path)
|
spec = importlib.util.spec_from_file_location(module_name, file_path)
|
||||||
|
|||||||
Reference in New Issue
Block a user