Skip to content

Fix unstable formatting with some # type: ignores#1113

Merged
JelleZijlstra merged 1 commit intopsf:masterfrom
msullivan:unstable
Nov 25, 2019
Merged

Fix unstable formatting with some # type: ignores#1113
JelleZijlstra merged 1 commit intopsf:masterfrom
msullivan:unstable

Conversation

@msullivan
Copy link
Contributor

type: ignore shouldn't block collapsing a line, since it will still
apply fine to the merged line. This prevents an issue where a reformat
causes it to shift lines and then be merged on a subsequent pass.

There is a downside to this, which is that it can cause a type: ignore to apply to more code than was originally intended. There
might be a way to apply this in a more limited situation, but I'm not
sure what it is.

Fixes #1061.

`type: ignore` shouldn't block collapsing a line, since it will still
apply fine to the merged line. This prevents an issue where a reformat
causes it to shift lines and then be merged on a subsequent pass.

There is a downside to this, which is that it can cause a `type:
ignore` to apply to more code than was originally intended. There
might be a way to apply this in a more limited situation, but I'm not
sure what it is.

Fixes psf#1061.
@JelleZijlstra JelleZijlstra merged commit 4b449e7 into psf:master Nov 25, 2019
@JelleZijlstra
Copy link
Collaborator

Sorry for the delay!

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.

Unstable formatting with "# type: ignore" comment

3 participants