ruff/crates
Charlie Marsh 87984e9ac7
Expand parents whenever open-parenthesis comments are present (#6389)
## Summary

This PR modifies our dangling-open-parenthesis handling to _always_
expand the parent expression.

So, for example, given:

```python
a = int(  # type: ignore
    int(  # type: ignore
        int(  # type: ignore
            6
        )
    )
)
```

We now retain that as stable formatting, instead of truncating like:

```python
a = int(int(int(6)))  # comment  # comment  # comment
```

Note that Black _does_ collapse comments like this _unless_ they're `#
type: ignore` comments, and perhaps in some other cases, so this is an
intentional deviation
([playground](https://black.vercel.app/?version=main&state=_Td6WFoAAATm1rRGAgAhARYAAAB0L-Wj4AFEAHpdAD2IimZxl1N_WlOfrjryFgvD4ScVsKPztqdHDGJUg5knO0JCdpUfW1IrWSNmIJPx95s0hP-pRNkCQNH64-eIznIvXjeWBQ5-qax0oNw4yMOuhwr2azvMRZaEB5r8IXVPHmRCJp7fe7y4290u1zzxqK_nAi6q_5sI-jsAAAAA8HgZ9V7hG3QAAZYBxQIAAGnCHXexxGf7AgAAAAAEWVo=)).
2023-08-08 08:45:20 -04:00
..
flake8_to_ruff Bump version to 0.0.282 (#6241) 2023-08-01 13:21:33 +00:00
ruff Fix name of rule in example of extend-per-file-ignores in options.rs (#6417) 2023-08-08 11:24:41 +02:00
ruff_benchmark Use Jupyter mode while parsing Notebook files (#5552) 2023-08-05 00:32:07 +00:00
ruff_cache Only use a single cache file per Python package (#5117) 2023-06-19 17:46:13 +02:00
ruff_cli Use Jupyter mode while parsing Notebook files (#5552) 2023-08-05 00:32:07 +00:00
ruff_dev Use Jupyter mode while parsing Notebook files (#5552) 2023-08-05 00:32:07 +00:00
ruff_diagnostics Skip partial duplicates when applying multi-edit fixes (#6144) 2023-07-29 12:11:57 +00:00
ruff_formatter Formatter comment handling nits (#6339) 2023-08-04 13:22:16 +00:00
ruff_index Add unreachable code rule (#5384) 2023-07-04 14:27:23 +00:00
ruff_macros Remove parser dependency from ruff-python-ast (#6096) 2023-07-26 17:47:22 +02:00
ruff_python_ast Rename JoinedStr to FString in the AST (#6379) 2023-08-07 17:33:17 +00:00
ruff_python_codegen Rename JoinedStr to FString in the AST (#6379) 2023-08-07 17:33:17 +00:00
ruff_python_formatter Expand parents whenever open-parenthesis comments are present (#6389) 2023-08-08 08:45:20 -04:00
ruff_python_index Avoid detecting continuations at non-start-of-line (#6219) 2023-08-01 00:20:29 -04:00
ruff_python_literal [pylint] Implement Pylint bad-format-character (E1300) (#6171) 2023-08-02 21:32:43 +00:00
ruff_python_parser Rename JoinedStr to FString in the AST (#6379) 2023-08-07 17:33:17 +00:00
ruff_python_resolver Replace .map_or(false, $closure) with .is_some_and(closure) (#6244) 2023-08-01 19:29:42 +02:00
ruff_python_semantic Change model: &SemanticModel to semantic: &SemanticModel (#6406) 2023-08-07 16:32:55 -04:00
ruff_python_stdlib Replace .map_or(false, $closure) with .is_some_and(closure) (#6244) 2023-08-01 19:29:42 +02:00
ruff_python_trivia Refactor and rename skip_trailing_trivia (#6312) 2023-08-04 13:30:53 +00:00
ruff_shrinking Use Jupyter mode while parsing Notebook files (#5552) 2023-08-05 00:32:07 +00:00
ruff_source_file Skip BOM when determining Locator's line starts (#6159) 2023-07-29 11:47:13 +00:00
ruff_text_size Pull in RustPython parser (#6099) 2023-07-27 09:29:11 +00:00
ruff_wasm Use Jupyter mode while parsing Notebook files (#5552) 2023-08-05 00:32:07 +00:00