Skip to content
Snippets Groups Projects
Commit 2135af68 authored by Simon Künzel's avatar Simon Künzel
Browse files

Use new JsonOnlyDeserializable in build pipeline generator

parent b6735c69
No related branches found
No related tags found
No related merge requests found
......@@ -5,11 +5,9 @@ from collections import defaultdict
from pathlib import Path
from argparse import ArgumentParser
sys.path.append(str(Path("common_py/src/").resolve()))
os.environ["VIDEOAG_CONFIG"] = "/dev/null"
from videoag_common.miscellaneous import CJsonValue, JsonDataClass, JsonSerializableEnum, json_field, JsonSerializable, \
JsonTypes
from videoag_common.miscellaneous import CJsonValue, JsonDataClass, JsonSerializableEnum, json_field, JsonOnlyDeserializable
class OsType(JsonSerializableEnum):
......@@ -17,7 +15,7 @@ class OsType(JsonSerializableEnum):
ALPINE = "alpine"
class OsModuleDependencies(JsonSerializable):
class OsModuleDependencies(JsonOnlyDeserializable):
def __init__(self, names_by_type: dict[OsType, set[str]] or None = None):
super().__init__()
......@@ -35,9 +33,6 @@ class OsModuleDependencies(JsonSerializable):
names_list.append(val.as_string(max_length=100))
return OsModuleDependencies(names_by_type)
def to_json(self) -> JsonTypes:
raise NotImplementedError()
def update(self, other: "OsModuleDependencies"):
for type, names in other._names_by_type.items():
self._names_by_type[type].update(names)
......
......@@ -54,6 +54,8 @@ from .json_condition import (
)
from .json_serializable import (
JsonSerializableInitException,
JsonOnlySerializable,
JsonOnlyDeserializable,
JsonSerializable,
json_field,
JsonDataClass,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment