Skip to content

codegen: Support pipe syntax for Union types#1336

Merged
zsol merged 1 commit intomainfrom
pr1336
May 26, 2025
Merged

codegen: Support pipe syntax for Union types#1336
zsol merged 1 commit intomainfrom
pr1336

Conversation

@zsol
Copy link
Copy Markdown
Contributor

@zsol zsol commented May 25, 2025

codegen: Support pipe syntax for Union types

From 3.14 onwards, we'll get foo | bar instead of typing.Union[foo, bar] as the annotation for union types (including optional). This PR prepares the codegen script for this.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 25, 2025
@zsol zsol force-pushed the pr1336 branch 3 times, most recently from 4f9e140 to e05a557 Compare May 25, 2025 21:16
From 3.14 onwards, we'll get `foo | bar` instead of `typing.Union[foo, bar]` as the annotation for union types (including optional). This PR prepares the codegen script for this.
@zsol zsol marked this pull request as ready for review May 25, 2025 21:20
@zsol zsol mentioned this pull request May 25, 2025
@zsol zsol merged commit 3dc2289 into main May 26, 2025
61 checks passed
jorenham pushed a commit to jorenham/LibCST that referenced this pull request Feb 3, 2026
From 3.14 onwards, we'll get `foo | bar` instead of `typing.Union[foo, bar]` as the annotation for union types (including optional). This PR prepares the codegen script for this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants