Closed ringohoffman closed 1 year ago
I believe you don't need to remove the arg schema: Union[Type[T], Dict[Any, Any], None] = None
, just to change _: Any
to definition: Any
. I've faced the same issue with tox on my PR https://github.com/s-knibbs/dataclasses-jsonschema/pull/185
For https://github.com/s-knibbs/dataclasses-jsonschema/issues/181:
Summary
New in version 3.10:
dataclasses.field(..., kw_only=MISSING)
kw_only
: If true, this field will be marked as keyword-only. This is used when the generated init() method’s parameters are computed.schema_helper(self, name: str, _: Any, *, schema: Union[Type[T], Dict[Any, Any], None] = None, **kwargs: Any)
→
schema_helper(self, name: str, definition: Any, **kwargs)
+schema = kwargs.get("schema", None)
Testing