You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current approach with CustomResource["relative/path/to/crd.yaml", "spec", "some_property"] is limited to having only one definition/version in crd file and its impossible to extend with new options. Returned errors always mention TypedDict('Jsonschema') which is not userfriendly.
gordonbondon
changed the title
New dynamic class CustomResourceDict with version support
Add new dynamic class CustomResourceDict with version support
Mar 23, 2021
Current approach with
CustomResource["relative/path/to/crd.yaml", "spec", "some_property"]
is limited to having only one definition/version in crd file and its impossible to extend with new options. Returned errors always mentionTypedDict('Jsonschema')
which is not userfriendly.Instead, we should use
get_dynamic_class_hook
https://github.com/python/mypy/blob/3acbf3fe78a61c19ff96754233ada453472004c4/mypy/plugin.py#L692-L705 to provide more options while creating custom resource type definition. Possible syntax:First iteration should include these features:
CustomResourceDict
dynamic hookCustomResourceDefinition
TypeDict
name fromkind
Similar to https://github.com/lovasoa/marshmallow_dataclass/blob/513e8bfc0dcef02314180790486cea3c04f65178/marshmallow_dataclass/mypy.py
The text was updated successfully, but these errors were encountered: