From 04ef8d824ebf6ae99467bcb29166c864be4c7eee Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Sat, 6 Jul 2024 17:55:19 +0200 Subject: [PATCH] Inventory spec: make system optional --- lib/inventory/spec/schema/schema.cue | 2 +- pkgs/clan-cli/tests/test_api_dataclass_compat.py | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/inventory/spec/schema/schema.cue b/lib/inventory/spec/schema/schema.cue index 09689584..eded84e2 100644 --- a/lib/inventory/spec/schema/schema.cue +++ b/lib/inventory/spec/schema/schema.cue @@ -5,7 +5,7 @@ package schema description?: string, icon?: string tags: [...string] - system: string + system?: string } #role: string diff --git a/pkgs/clan-cli/tests/test_api_dataclass_compat.py b/pkgs/clan-cli/tests/test_api_dataclass_compat.py index 4641da3d..d54f4e54 100644 --- a/pkgs/clan-cli/tests/test_api_dataclass_compat.py +++ b/pkgs/clan-cli/tests/test_api_dataclass_compat.py @@ -75,10 +75,6 @@ def load_dataclass_from_file( module_name = ( 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: sys.path.insert(0, root_dir) spec = importlib.util.spec_from_file_location(module_name, file_path)