Closed mhostetter closed 2 years ago
It also appears python_transform_type_annotations_concise_literal = True
doesn't appear to be applied (at least when using python-apigen
).
I updated the foo
project.
def func_2(x: int, option: Literal[1, 2, "abc"]) -> int:
I'm not able to reproduce this with Python 3.9, but it may be python version dependent.
Yes, I see that it fails on Python 3.8 --- will have to look into it.
I'm observing some issues with
python_transform_type_annotations_pep604
. There are times whenUnion[a, b]
isn't converted toa | b
but rathera, b
. The same happens when wrapping in anOptional[]
type hint.Here is a reproducible
foo
project. I'm testing with current main (00c681084ef9ec4be3a936d30367f64802bc7854).foo-example.zip