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

Reformatted all files with black and isort #4224

Closed
wants to merge 4 commits into from

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented Jun 11, 2020

A few comments between imports were removed or moved to the top of the
import block, due to behavioral differences between black and isort. See
psf/black#251 for details.

In two instances @overloads at the top of the file needed to be moved
due to psf/black#1490.

A few comments between imports were removed or moved to the top of the
import block, due to behavioral differences between black and isort. See
psf/black#251 for details.

In two instances @Overloads at the top of the file needed to be moved
due to psf/black#1490.
@srittau
Copy link
Collaborator Author

srittau commented Jun 11, 2020

Now pytype fails. It was fine with the previous commit, but bails when moving the # type: ignore comments to the first line. Cc @rchen152

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

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

Feel free to merge this as soon as CI passes.

Were you able to figure out what exactly pytype is choking on? It seems to be reporting errors for files that import the broken file, since some of the files that it complains about in CI have only whitespace changes. The problem looks to be somewhere in asyncio but I haven't been able to find out which file exactly.

@srittau
Copy link
Collaborator Author

srittau commented Jun 12, 2020

The problem is only with the second commit, which only touches three files. I will see whether I can work around this later.

@rchen152
Copy link
Collaborator

Sorry, just saw this. At a glance, it looks like pytype doesn't expect a # type: ignore after the opening parenthesis in a function definition? I'll take a look.

rchen152 added a commit to google/pytype that referenced this pull request Jun 12, 2020
For python/typeshed#4224.

We really need a better pyi parser...

PiperOrigin-RevId: 316171517
@rchen152
Copy link
Collaborator

I pushed a pytype change to allow # type: ignore after the opening parenthesis in a function definition. (Sorry this issue keeps coming up! We've been wanting to fix our pyi parser for a long time, but there's always something more urgent to do...) If all goes well, a release containing this change should go out sometime next week.

@srittau
Copy link
Collaborator Author

srittau commented Jun 14, 2020

Closing. I will open a new PR when the new pytest version is released. In the meantime, #4228 contains a few changes from this PR to address black and isort incompatibilities that will ease the Big Reformat.

@srittau srittau closed this Jun 14, 2020
@JelleZijlstra
Copy link
Member

Looks like the pytype release hasn't gone out just yet.

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