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

Check for PEP 604 usage in CI #5903

Merged
merged 3 commits into from
Aug 28, 2021
Merged

Conversation

hauntsaninja
Copy link
Collaborator

Since this is a common review issue and our stubs have all been
converted

@hauntsaninja hauntsaninja force-pushed the pep604ci branch 2 times, most recently from 9c6b027 to f15ddca Compare August 9, 2021 21:28
@hauntsaninja hauntsaninja marked this pull request as ready for review August 9, 2021 21:30
@JelleZijlstra
Copy link
Member

I'd rather put this in flake8-pyi, I'm happy to do the merging and releasing on a PR on that repo.

@srittau
Copy link
Collaborator

srittau commented Aug 9, 2021

Also, | doesn't work in type aliases yet, so we can't check for it, at the moment.

@srittau
Copy link
Collaborator

srittau commented Aug 9, 2021

PyCQA/flake8-pyi#45

Since this is a common review issue and our stubs have all been
converted
@hauntsaninja
Copy link
Collaborator Author

@srittau This script doesn't check type aliases (just annotated assignments, function args, function returns), so should be fine to merge if we wanted to.
@JelleZijlstra that's a good point, I'll take a look. flake8-pyi won't be able to use ast.unparse for friendly errors, but should otherwise be workable.

@JelleZijlstra
Copy link
Member

Sounds good!

Relatedly would either of you be interested in becoming a maintainer on flake8-pyi? I don't have the power to add more maintainers but I'm sure Lukasz would be OK with that.

@hauntsaninja
Copy link
Collaborator Author

Sure!

@srittau
Copy link
Collaborator

srittau commented Aug 9, 2021

I'd be glad to help out.

@JelleZijlstra
Copy link
Member

@ambv would you mind giving @hauntsaninja and @srittau commit access to https://github.com/ambv/flake8-pyi ?

@ambv
Copy link
Contributor

ambv commented Aug 10, 2021

@JelleZijlstra, done! Welcome, @srittau and @hauntsaninja.

@hauntsaninja hauntsaninja deleted the pep604ci branch August 12, 2021 00:10
@hauntsaninja hauntsaninja restored the pep604ci branch August 27, 2021 18:21
@hauntsaninja hauntsaninja reopened this Aug 27, 2021
@hauntsaninja
Copy link
Collaborator Author

Re-opening; feels like a good idea to have this for now, and add the check to flake8-pyi when we can use PEP 604 in type aliases cc @srittau

@srittau
Copy link
Collaborator

srittau commented Aug 27, 2021

👍 Since the next mypy release is not in sight, creating a flake8-pyi check is not really useful at the moment. As a stopgap, this will do for now. Cc @JelleZijlstra

@Akuli
Copy link
Collaborator

Akuli commented Aug 28, 2021

@hoefling Before I saw this PR, I pinged you on another merged PR asking you to do this, but now I can't find that PR. Sorry about that.

@hauntsaninja hauntsaninja merged commit f6e4c9c into python:master Aug 28, 2021
@hauntsaninja hauntsaninja deleted the pep604ci branch August 28, 2021 18:37
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.

5 participants