google / google/yapf

Format error when async method after comment

Open
#1,183 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
14k
Forks
904
PR merge metrics
No merged PRs in 30d

Description

befor format:
![image](https://github.com/google/yapf/assets/41715438/a1b73d9f-aa75-4957-88ad-e9adf26d44a7)

afeter format:
![image](https://github.com/google/yapf/assets/41715438/bcc359ca-94e7-4e8a-bb26-aba9179d9cf1)

expect reault:
![image](https://github.com/google/yapf/assets/41715438/1988024a-4f13-4aa3-a429-138a1be2b19f)

same code without async, after format, it's good:
![image](https://github.com/google/yapf/assets/41715438/b8187991-368e-4cba-8623-8d803a72a58c)

I am not using config file.I use yapf in vscode.This comment is not for the method but for the file, so I would hope for that result.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.