Skip to content

Check for PEP 604 usage in CI - #5903

Merged
hauntsaninja merged 3 commits into
python:masterfrom
hauntsaninja:pep604ci
Aug 28, 2021
Merged

hauntsaninja merged 3 commits into
python:masterfrom
hauntsaninja:pep604ci

Conversation

@hauntsaninja

Copy link
Copy Markdown
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
Copy Markdown
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

srittau commented Aug 9, 2021

Copy link
Copy Markdown
Collaborator

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

@srittau

srittau commented Aug 9, 2021

Copy link
Copy Markdown
Collaborator

PyCQA/flake8-pyi#45

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator Author

Sure!

@srittau

srittau commented Aug 9, 2021

Copy link
Copy Markdown
Collaborator

I'd be glad to help out.

@JelleZijlstra

Copy link
Copy Markdown
Member

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

@ambv

ambv commented Aug 10, 2021

Copy link
Copy Markdown
Contributor

@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
Copy Markdown
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

srittau commented Aug 27, 2021

Copy link
Copy Markdown
Collaborator

👍 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

Akuli commented Aug 28, 2021

Copy link
Copy Markdown
Collaborator

@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