google / google/yapf

Request: support splitting and align long type annotations.

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

Description

Would be great if yapf could format the code like:

```python
class Engine(
Generic[
_T_INIT_CONFIG,
_T_INIT_RESOURCE,
_T_RUN_CONFIG,
_T_RUN_OUTPUT,
]
):
...

class EngineExecutorAggregatorSelector(
Generic[
_T_RUN_CONFIG,
_T_RUN_OUTPUT,
]
): # yapf: disable

def __init__(
self,
pairs: Sequence[
Tuple[
EngineExecutor[
Any,
Any,
_T_RUN_CONFIG,
_T_RUN_OUTPUT,
],
float,
]
],
):
...
```

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.