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

Regression in formatting nested 'async def' functions #484

Closed
njsmith opened this issue Dec 10, 2017 · 0 comments
Closed

Regression in formatting nested 'async def' functions #484

njsmith opened this issue Dec 10, 2017 · 0 comments

Comments

@njsmith
Copy link
Contributor

njsmith commented Dec 10, 2017

My style file has blank_line_before_nested_class_or_def=False.

Yapf 0.19.0 formats like:

async def foo():
    async def bar():
        pass

Yapf 0.20.0 changes this to:

async def foo():

    async def bar():
        pass

According to git bisect, this was introduced by 58e3694, which seems like it must be a bug, since that commit wasn't intended to change python 3 formatting at all.

njsmith added a commit to njsmith/yapf that referenced this issue Dec 10, 2017
The old code was comparing a generator object against a tuple, which
will never be true. Also it was using token.name, instead of
token.value, for some reason.

Fixes google#484
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

No branches or pull requests

1 participant