Closed beckjake closed 3 years ago
Python 3.9 changed the way typing.Optional is represented - in particular
typing.Optional
This used to be how python represented a typing.Optional. An Optional is really just a Union that includes None in python 3.6-3.8:
Union
None
>>> typing.Optional[int] typing.Union[int, NoneType]
But in python 3.9, the typing.Optional is preserved when there is only None + one item:
>>> typing.Optional[int] typing.Optional[int]
This breaks hologram (and therefore dbt) because it only checks for Union everywhere. It shouldn't be too hard to fix!
Python 3.9 changed the way
typing.Optional
is represented - in particularThis used to be how python represented a typing.Optional. An Optional is really just a
Union
that includesNone
in python 3.6-3.8:But in python 3.9, the typing.Optional is preserved when there is only None + one item:
This breaks hologram (and therefore dbt) because it only checks for Union everywhere. It shouldn't be too hard to fix!