Closed dylanmorroll closed 1 year ago
@dylanmorroll I opened a PR with a fix for this issue here. You should be able to install it with pip install https://github.com/antonagestam/dacite/archive/234d486.tar.gz
until a fix is released.
@dylanmorroll should be fixed with https://github.com/konradhalas/dacite/commit/6e61433b6b1cf9956a33f22510000124f22977b2
In Python 3.10
typing.Union
works, but using the operator|
does not.Here is some sample code using the union operator:
The result of this is:
However, using
typing.Union
works fine:The pyupgrade tool for 3.10 automatically changes
Optional
andUnion
to the union operator|
, see here, so these tools do not work together very well at the moment.(The rest of the tool is great btw, thanks!)