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 | instead of typing.Union, typing.Optional (PEP 604) #386

Merged
merged 1 commit into from
Oct 4, 2022

Conversation

PerchunPak
Copy link
Member

Why am I using flake8-new-union-types, and not flake8-pep604? Second one is checking only imports and only typing.Union, typing.Optional was ignored.

(Inspired by #375. There are also description why this will work on 3.7, even if was added only in 3,10)

@PerchunPak PerchunPak force-pushed the pep-604 branch 2 times, most recently from 9954220 to 2f58598 Compare August 29, 2022 21:05
@ItsDrike ItsDrike added type: enhancement Improvement to an existing feature area: API Related to core API of the project status: needs review Author is waiting for someone to review and approve labels Aug 30, 2022
mcstatus/protocol/connection.py Outdated Show resolved Hide resolved
mcstatus/pinger.py Outdated Show resolved Hide resolved
mcstatus/protocol/connection.py Outdated Show resolved Hide resolved
Copy link
Member

@ItsDrike ItsDrike left a comment

Choose a reason for hiding this comment

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

Code-quality wise, this is ready to be merged. The only question is whether we actually want to be using this new syntax already, which I think we can do,

Why am I using `flake8-new-union-types`, and not `flake8-pep604`? Second
one is checking only imports and only `typing.Union`, `typing.Optional`
was ignored.

(Inspired by py-mine#375)
@ItsDrike ItsDrike merged commit 8b35f8f into py-mine:master Oct 4, 2022
@PerchunPak PerchunPak deleted the pep-604 branch October 4, 2022 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: API Related to core API of the project status: needs review Author is waiting for someone to review and approve type: enhancement Improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants