Allow doule indentation for function definitions
- Dominant language
- Python
- Stars
- 14k
- Forks
- 904
- PR merge metrics
- No merged PRs in 30d
Description
Many projects use double indentation for function definition arguments. That is in order to allow the arguments to be clearly separated and visible.
I have not found a configuraion/knob to allow this with yapf. No matter my config it always try to go only for single indentation. How could I make the following not be changed?
```diff
def create_oracle_cache(
- self,
- oracle: HistoricalPriceOracle,
- from_asset: AssetWithOracles,
- to_asset: AssetWithOracles,
- purge_old: bool,
+ self,
+ oracle: HistoricalPriceOracle,
+ from_asset: AssetWithOracles,
+ to_asset: AssetWithOracles,
+ purge_old: bool,
) -> None:
```
Keep in mind the double indentation is **only** for function definitions. Everywhere else it should be single.
Related issue but still no solution: https://github.com/google/yapf/issues/843
Contributor guide
Assessment
This issue has not been assessed yet.