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

Function definitions inside if blocks introduce whitespace #1249

Closed
nyanpasu64 opened this issue Jan 28, 2020 · 1 comment
Closed

Function definitions inside if blocks introduce whitespace #1249

nyanpasu64 opened this issue Jan 28, 2020 · 1 comment
Labels
T: style What do we want Blackened code to look like?

Comments

@nyanpasu64
Copy link

Describe the style change

Right now, if you def a function inside an if block, a new line is introduced between the if and the def. I think this looks too spaced out and unpleasant to read.

Examples in the current Black style

if condition:

    def func():
        ...

    func()

Desired style

if condition:
    def func():
        ...

    func()

Additional context Add any other context about the problem here.

This is related to #196, but that issue seems to be for functions defined directly in other functions, not in blocks.

@nyanpasu64 nyanpasu64 added the T: style What do we want Blackened code to look like? label Jan 28, 2020
@ichard26
Copy link
Collaborator

ichard26 commented Oct 1, 2020

This falls under issue #450 (via #377). Just recently closed #1691 for the same reason.

@ichard26 ichard26 closed this as completed Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: style What do we want Blackened code to look like?
Projects
None yet
Development

No branches or pull requests

2 participants