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

Preserve whitespace before hash mark on hanging comments #31

Merged
merged 8 commits into from
Jan 27, 2021

Conversation

warsaw
Copy link
Collaborator

@warsaw warsaw commented Jan 23, 2021

We're close but not quite there yet!

error: cannot format /tmp/bar.py: INTERNAL ERROR: Black produced different code on the second pass of the formatter.  Please report a bug on https://github.com/psf/black/issues.  This diff might be helpful: /var/folders/dg/2gcv7qh1141dfc13k7kbty7w000slb/T/blk_81rqaiyh.log
Oh no! 💥 💔 💥
1 file would fail to reformat.

Closes #20

We're close but not quite there yet!

```
error: cannot format /tmp/bar.py: INTERNAL ERROR: Black produced different code on the second pass of the formatter.  Please report a bug on https://github.com/psf/black/issues.  This diff might be helpful: /var/folders/dg/2gcv7qh1141dfc13k7kbty7w000slb/T/blk_81rqaiyh.log
Oh no! 💥 💔 💥
1 file would fail to reformat.
```

Closes #20
@warsaw warsaw self-assigned this Jan 23, 2021
@warsaw warsaw added this to the 0.6.0 milestone Jan 23, 2021
@warsaw warsaw marked this pull request as ready for review January 26, 2021 05:19
@warsaw
Copy link
Collaborator Author

warsaw commented Jan 26, 2021

Still needs some testing, but I think this does it.

@warsaw
Copy link
Collaborator Author

warsaw commented Jan 26, 2021

I've also refactored the monkey patching mechanisms.

@warsaw warsaw changed the title WIP: Preserve whitespace before hash mark on hanging comments Preserve whitespace before hash mark on hanging comments Jan 27, 2021
@grantjenks
Copy link
Owner

LGTM!

@warsaw warsaw merged commit f51bc9c into master Jan 27, 2021
@warsaw warsaw deleted the unsquozed-comments branch January 27, 2021 01:30
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.

Don't squeeze hanging comments to the left
2 participants