s-knibbs / dataclasses-jsonschema

JSON schema generation from dataclasses
MIT License
167 stars 38 forks source link

Nullable type causes mypy errors #79

Closed s-knibbs closed 5 years ago

s-knibbs commented 5 years ago

The Nullable type added in #78 is currently causing mypy errors. It should be changed to:

T = TypeVar("T")
Nullable = Union[T, _NULL_TYPE]

I didn't do this initially since there doesn't seem to be an easy way to reflect on the types in python 3.6.