Skip to content
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

Use newer type hint syntax #72

Merged
merged 3 commits into from
Dec 6, 2023
Merged

Use newer type hint syntax #72

merged 3 commits into from
Dec 6, 2023

Conversation

StephenChan
Copy link
Member

Mostly PEP 585 and PEP 604. I keep wanting to do this every time I edit a file, so might as well get it all out of the way before working on other stuff.

Replacing Optional[x] with x | None is a little picky, but all else being equal, I think it's better to have one less import. (The from __future__ import annotations imports should no longer be necessary whenever pyspacer's minimum version is bumped far enough; I believe it's 3.9 for PEP 585, 3.10 for PEP 604.)

@StephenChan StephenChan marked this pull request as ready for review December 6, 2023 23:14
@StephenChan StephenChan merged commit 37274b4 into main Dec 6, 2023
3 checks passed
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.

1 participant