ruff/crates
Micha Reiser c260762900
Formatter: Implicit concatenation in compare expressions
## Summary

This PR implements the logic for breaking implicit concatenated strings before compare expressions by building on top of  #7145 

The main change is a new `BinaryLike` enum that has the `BinaryExpression` and `CompareExpression` variants. Supporting both variants requires some downstream changes but doesn't introduce any new concepts. 

## Test Plan

I added a few more tests. The compatibility improvements are minor but we now perfectly match black on twine 🥳 


**PR**

| project      | similarity index  | total files       | changed files     |
|--------------|------------------:|------------------:|------------------:|
| cpython      |           0.76083 |              1789 |              1632 |
| django       |           0.99966 |              2760 |                58 |
| transformers |           0.99928 |              2587 |               454 |
| **twine**        |           1.00000 |                33 |                 0 | <-- improved
| typeshed     |           0.99978 |              3496 |              2173 |
| **warehouse**    |           0.99824 |               648 |                22 | <-- improved
| zulip        |           0.99948 |              1437 |                28 |


**Base**

| project      | similarity index  | total files       | changed files     |
|--------------|------------------:|------------------:|------------------:|
| cpython      |           0.76083 |              1789 |              1633 |
| django       |           0.99966 |              2760 |                58 |
| transformers |           0.99928 |              2587 |               454 |
| twine        |           0.99982 |                33 |                 1 | 
| typeshed     |           0.99978 |              3496 |              2173 |
| warehouse    |           0.99823 |               648 |                23 |
| zulip        |           0.99948 |              1437 |                28 |
2023-09-08 11:32:20 +02:00
..
flake8_to_ruff Bump version to 0.0.287 (#7038) 2023-09-01 17:32:26 +01:00
ruff Do not use code location for Gitlab fingerprints. (#7203) 2023-09-08 08:25:26 +02:00
ruff_benchmark Add lexer benchmark (#7132) 2023-09-04 13:18:36 +00:00
ruff_cache Error on zero tab width (#6429) 2023-08-08 16:51:37 -04:00
ruff_cli Add alpha instructions to the ruff_python_formatter README (#7064) 2023-09-06 11:55:16 +00:00
ruff_dev Use ruff line-length in format_dev (#6870) 2023-09-05 16:19:17 +02:00
ruff_diagnostics Create ruff_notebook crate (#7039) 2023-09-01 13:56:44 +00:00
ruff_formatter Split implicit concatenated strings before binary expressions (#7145) 2023-09-08 06:51:26 +00:00
ruff_index
ruff_macros Move Configuration to ruff_workspace crate (#6920) 2023-08-28 06:21:35 +00:00
ruff_notebook Create ruff_notebook crate (#7039) 2023-09-01 13:56:44 +00:00
ruff_python_ast Move ExprConstant::kind to StringConstant::unicode (#7180) 2023-09-06 07:39:25 +00:00
ruff_python_codegen Move ExprConstant::kind to StringConstant::unicode (#7180) 2023-09-06 07:39:25 +00:00
ruff_python_formatter Formatter: Implicit concatenation in compare expressions 2023-09-08 11:32:20 +02:00
ruff_python_index Move Ranged into ruff_text_size (#6919) 2023-08-27 14:12:51 -04:00
ruff_python_literal Avoid parsing other parts of a format specification if replacements are present (#6858) 2023-08-25 17:42:57 +00:00
ruff_python_parser Add Lexer emoji test case (#7213) 2023-09-07 10:02:50 +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 Move refurb/helpers utils to ruff_python_semantic for broader use (#6990) 2023-08-29 14:45:09 -04:00
ruff_python_stdlib Use the unicode-ident crate (#7212) 2023-09-07 08:19:25 +00:00
ruff_python_trivia Use the unicode-ident crate (#7212) 2023-09-07 08:19:25 +00:00
ruff_shrinking Move Ranged into ruff_text_size (#6919) 2023-08-27 14:12:51 -04:00
ruff_source_file Fixed panic in missing_copyright_notice (#7029) 2023-09-01 13:58:48 +00:00
ruff_text_size Unify line size settings between ruff and the formatter (#6873) 2023-08-28 06:44:56 +00:00
ruff_wasm Split implicit concatenated strings before binary expressions (#7145) 2023-09-08 06:51:26 +00:00
ruff_workspace Add extend-ignore-names for flake8-self (#7194) 2023-09-07 13:41:22 +00:00