Skip to content

stubgen: Use PEP 604 instead of Optional #10624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 10, 2021

Conversation

srittau
Copy link
Contributor

@srittau srittau commented Jun 10, 2021

Description

stubgen: Use PEP 604 syntax instead of Optional.

Test Plan

I changed the existing unit tests.

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Little bit concerned about this one, since I believe last time I checked (for both mypy and pyright) PEP 604 didn't work in type aliases

@JelleZijlstra
Copy link
Member

Looks like stubgen will only generate this in function parameters though, where it should be safe.

@JelleZijlstra JelleZijlstra merged commit 1cad082 into python:master Jun 10, 2021
@srittau srittau deleted the stubgen-pep604 branch June 10, 2021 21:44
@srittau srittau mentioned this pull request Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants