From 37daaea14ce37201ac9184febfc1dc72349587d7 Mon Sep 17 00:00:00 2001 From: Matthew F Leader Date: Wed, 4 Sep 2024 18:23:59 -0400 Subject: [PATCH] fix style --- src/arcaflow_plugin_sdk/schema.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/arcaflow_plugin_sdk/schema.py b/src/arcaflow_plugin_sdk/schema.py index dae8711..6524cd8 100644 --- a/src/arcaflow_plugin_sdk/schema.py +++ b/src/arcaflow_plugin_sdk/schema.py @@ -2525,8 +2525,10 @@ class ObjectSchema(_JSONSchemaGenerator, _OpenAPIGenerator): id_unenforced: typing.Annotated[ typing.Optional[bool], _name("ID Unenforced"), - _description("If true, the ID does not need to match another object " - "for them to be considered compatible."), + _description( + "If true, the ID does not need to match another object " + "for them to be considered compatible." + ), ] = None def _to_jsonschema_fragment( @@ -2590,6 +2592,7 @@ class OneOfTypeMetadata: None ) + @dataclass class OneOfSchema(_JSONSchemaGenerator, _OpenAPIGenerator): types: typing.Union[ @@ -2611,10 +2614,14 @@ class OneOfSchema(_JSONSchemaGenerator, _OpenAPIGenerator): "Name of the field used to discriminate between possible values." ), ] = "_type" - myoneof_type: typing.Annotated[str, _name("One Of Type Schema Name")] = None + myoneof_type: typing.Annotated[str, _name("One Of Type Schema Name")] = ( + None + ) def schema_metadata(self) -> OneOfTypeMetadata: - raise NotImplementedError("schema_metadata() is not implemented in the subclass") + raise NotImplementedError( + "schema_metadata() is not implemented in the subclass" + ) def _insert_discriminator( self, @@ -6814,9 +6821,8 @@ def _resolve_forward( # Note: This is an unstable API. # noinspection PyProtectedMember resolved = t._evaluate( - globalns=None, - localns=None, - recursive_guard=frozenset()) + globalns=None, localns=None, recursive_guard=frozenset() + ) return cls._resolve(resolved, resolved, path, scope) @classmethod