ominfra 0.0.0.dev134__py3-none-any.whl → 0.0.0.dev136__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- ominfra/manage/deploy/_executor.py +9 -6
- ominfra/manage/new/__init__.py +1 -0
- ominfra/manage/new/_manage.py +1646 -0
- ominfra/manage/new/commands/__init__.py +0 -0
- ominfra/manage/new/commands/base.py +25 -0
- ominfra/manage/new/commands/subprocess.py +73 -0
- ominfra/manage/new/main.py +162 -0
- ominfra/pyremote.py +21 -7
- ominfra/scripts/journald2aws.py +9 -6
- ominfra/scripts/supervisor.py +13 -7
- {ominfra-0.0.0.dev134.dist-info → ominfra-0.0.0.dev136.dist-info}/METADATA +3 -3
- {ominfra-0.0.0.dev134.dist-info → ominfra-0.0.0.dev136.dist-info}/RECORD +16 -10
- {ominfra-0.0.0.dev134.dist-info → ominfra-0.0.0.dev136.dist-info}/LICENSE +0 -0
- {ominfra-0.0.0.dev134.dist-info → ominfra-0.0.0.dev136.dist-info}/WHEEL +0 -0
- {ominfra-0.0.0.dev134.dist-info → ominfra-0.0.0.dev136.dist-info}/entry_points.txt +0 -0
- {ominfra-0.0.0.dev134.dist-info → ominfra-0.0.0.dev136.dist-info}/top_level.txt +0 -0
@@ -734,6 +734,13 @@ class PolymorphicObjMarshaler(ObjMarshaler):
|
|
734
734
|
impls_by_ty: ta.Mapping[type, Impl]
|
735
735
|
impls_by_tag: ta.Mapping[str, Impl]
|
736
736
|
|
737
|
+
@classmethod
|
738
|
+
def of(cls, impls: ta.Iterable[Impl]) -> 'PolymorphicObjMarshaler':
|
739
|
+
return cls(
|
740
|
+
{i.ty: i for i in impls},
|
741
|
+
{i.tag: i for i in impls},
|
742
|
+
)
|
743
|
+
|
737
744
|
def marshal(self, o: ta.Any) -> ta.Any:
|
738
745
|
impl = self.impls_by_ty[type(o)]
|
739
746
|
return {impl.tag: impl.m.marshal(o)}
|
@@ -821,7 +828,7 @@ def _make_obj_marshaler(
|
|
821
828
|
) -> ObjMarshaler:
|
822
829
|
if isinstance(ty, type):
|
823
830
|
if abc.ABC in ty.__bases__:
|
824
|
-
|
831
|
+
return PolymorphicObjMarshaler.of([ # type: ignore
|
825
832
|
PolymorphicObjMarshaler.Impl(
|
826
833
|
ity,
|
827
834
|
ity.__qualname__,
|
@@ -829,11 +836,7 @@ def _make_obj_marshaler(
|
|
829
836
|
)
|
830
837
|
for ity in deep_subclasses(ty)
|
831
838
|
if abc.ABC not in ity.__bases__
|
832
|
-
]
|
833
|
-
return PolymorphicObjMarshaler(
|
834
|
-
{i.ty: i for i in impls},
|
835
|
-
{i.tag: i for i in impls},
|
836
|
-
)
|
839
|
+
])
|
837
840
|
|
838
841
|
if issubclass(ty, enum.Enum):
|
839
842
|
return EnumObjMarshaler(ty)
|
@@ -0,0 +1 @@
|
|
1
|
+
# @omlish-lite
|