google / google/yapf

long func/method name handling

Open
#625 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

Hi,

tl;dr, what I want
```
def my_pure_long_fn_name(
param1: str = "param1",
param2: str = "param2",
param2: str = "param2"):
"""
docs
"""
```
it's really cool, because It handles method name renaming without codestyle corruption (globally by pycharm). Is there any correct yapf-style?

For now I see only two yapf-solutions:
1.
```
def my_pure_long_fn_name(param1: str = "param1",
param2: str = "param2",
param2: str = "param2"):
"""
docs
"""
```
awful for renaming
2.
```
def my_pure_long_fn_name(
param1: str = "param1",
param2: str = "param2",
param2: str = "param2"
):
"""
docs
"""
```
just a bit weird formatting.

PS. Sorry, if duplicated question.

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.