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

Handle else/elif/except/finally and indented functions better #5

Merged
merged 2 commits into from
Mar 23, 2020

Conversation

janverb
Copy link
Contributor

@janverb janverb commented Mar 23, 2020

This makes it possible to reformat lines that need to come after a block, like elif statements, and stops spurious whitespace from being added before indented functions.

I think those are the only problems I ran into in months of heavy use. Thank you for a very useful tool.

janverb added 2 commits March 18, 2020 19:02
To reformat indented code, `if True:` lines are prepended. But that
makes black insert whitespace inbetween, which we don't want.
@wbolster wbolster self-requested a review March 23, 2020 11:47
Copy link
Owner

@wbolster wbolster left a comment

Choose a reason for hiding this comment

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

nice, these are also the two gripes i personally experience!

@wbolster wbolster merged commit 703952e into wbolster:master Mar 23, 2020
@wbolster
Copy link
Owner

i shipped 1.2.0 with these changes:

https://pypi.org/project/black-macchiato/

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.

2 participants