Commit ce24e24
Support
* Support `get_origin(Union[...])` in python 3.14
In Python 3.14, `Union` is no longer a `typingGenericAlias`, so
`get_origin(int | str)` didn't return `Union`. This changes that by
explicitly checking for `is_union_type`. This adds a test for
`get_origin(Union[...])`.
* Fix lint
---------
Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>get_origin(Union[...]) in python 3.14 (#119)1 parent 58c98c0 commit ce24e24
2 files changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
| 358 | + | |
358 | 359 | | |
359 | 360 | | |
360 | 361 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
362 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
363 | 369 | | |
364 | 370 | | |
365 | 371 | | |
| |||
0 commit comments