Skip to content

Don't break long lines when type: ignore is present#1040

Merged
JelleZijlstra merged 1 commit intopsf:masterfrom
msullivan:type-ignores
Oct 3, 2019
Merged

Don't break long lines when type: ignore is present#1040
JelleZijlstra merged 1 commit intopsf:masterfrom
msullivan:type-ignores

Conversation

@msullivan
Copy link
Contributor

As Guido discussed in #997, breaking long lines with type: ignores has caused
us a lot of grief when the type: ignore is moved off the line with the type error.

Fixes #997.

@JelleZijlstra JelleZijlstra merged commit d9e71a7 into psf:master Oct 3, 2019
@msullivan msullivan deleted the type-ignores branch October 3, 2019 02:39
msullivan added a commit to msullivan/black that referenced this pull request Oct 11, 2019
In psf#1040 I had convinced myself that the type ignore logic didn't
need anything like the ignored_ids from the type comment logic, but I
was wrong, and we do.

We hit these cases in practice a bunch.
JelleZijlstra pushed a commit that referenced this pull request Oct 11, 2019
In #1040 I had convinced myself that the type ignore logic didn't
need anything like the ignored_ids from the type comment logic, but I
was wrong, and we do.

We hit these cases in practice a bunch.
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.

Please don't break long lines if a '# type: ignore' takes it over the max length

2 participants