google / google/yapf

Knob to set blank lines near imports, classes, functions and methods

Open
#347 10 comments 11 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
14k
Forks
904
PR merge metrics
No merged PRs in 30d

Description

`BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF` allows adding a blank line before nested classes or methods.

Ideally, a knob would allow setting a specified amount of blank lines near:

* Top-level imports
* Top-level classes and functions
* Classes
* Methods
* Top-level comments

Alternatively, offer a knob can allow "maximum blank lines", thus allowing blank lines after imports (for example). Right now they get formatted away.

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.