ruff/crates
Charlie Marsh d7508af48d
Truncate to one empty line in stub files (#7558)
## Summary

This PR modifies a variety of sites in which we insert up to two empty
lines to instead truncate to at most one empty line in stub files. We
already enforce this in _some_ places, but not all.

## Test Plan

`cargo test`

No changes in similarity (as expected, since this only impacts
unformatted `.pyi` files).

Before:

| project | similarity index | total files | changed files |

|--------------|------------------:|------------------:|------------------:|
| cpython | 0.76083 | 1789 | 1631 |
| django | 0.99983 | 2760 | 36 |
| transformers | 0.99963 | 2587 | 323 |
| twine | 1.00000 | 33 | 0 |
| typeshed | 0.99979 | 3496 | 22 |
| warehouse | 0.99967 | 648 | 15 |
| zulip | 0.99972 | 1437 | 21 |

After:

| project | similarity index | total files | changed files |

|--------------|------------------:|------------------:|------------------:|
| cpython | 0.76083 | 1789 | 1631 |
| django | 0.99983 | 2760 | 36 |
| transformers | 0.99963 | 2587 | 323 |
| twine | 1.00000 | 33 | 0 |
| typeshed | 0.99979 | 3496 | 22 |
| warehouse | 0.99967 | 648 | 15 |
| zulip | 0.99972 | 1437 | 21 |
2023-09-21 16:24:42 -04:00
..
flake8_to_ruff Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
ruff_benchmark Introduce `LinterSettings` 2023-09-20 17:02:34 +02:00
ruff_cache Introduce `FormatterSettings` (#7545) 2023-09-21 08:01:24 +02:00
ruff_cli Fix gitignore to not ignore files that are required (#7538) 2023-09-21 21:33:09 +02:00
ruff_dev Bump rayon from 1.7.0 to 1.8.0 (#7564) 2023-09-21 11:52:41 +02:00
ruff_diagnostics Create `ruff_notebook` crate (#7039) 2023-09-01 13:56:44 +00:00
ruff_formatter Introduce `FormatterSettings` (#7545) 2023-09-21 08:01:24 +02:00
ruff_index Add unreachable code rule (#5384) 2023-07-04 14:27:23 +00:00
ruff_linter Use `u8` to represent version segments (#7578) 2023-09-21 14:24:51 -04:00
ruff_macros Unify `Settings` and `AllSettings` (#7532) 2023-09-20 13:56:07 +00:00
ruff_notebook chore: Upgrade pyproject-toml crate (#7335) 2023-09-13 17:55:03 +02:00
ruff_python_ast Remove `Int` wrapper type from parser (#7577) 2023-09-21 17:01:44 +00:00
ruff_python_codegen Remove `Int` wrapper type from parser (#7577) 2023-09-21 17:01:44 +00:00
ruff_python_formatter Truncate to one empty line in stub files (#7558) 2023-09-21 16:24:42 -04:00
ruff_python_index Remove triple-quoted string ranges computation (#7476) 2023-09-18 20:57:49 +05:30
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 Remove `Int` wrapper type from parser (#7577) 2023-09-21 17:01:44 +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 Detect `asyncio.get_running_loop` calls in RUF006 (#7562) 2023-09-21 04:37:38 +00:00
ruff_python_stdlib Use `u8` to represent version segments (#7578) 2023-09-21 14:24:51 -04:00
ruff_python_trivia Tokenizer: Emit only a single bogus token (#7425) 2023-09-19 16:06:03 +02:00
ruff_shrinking Bump shlex from 1.1.0 to 1.2.0 (#7381) 2023-09-14 09:40:05 -05:00
ruff_source_file Use dot references in docs for methods (#7391) 2023-09-14 14:35:34 -04:00
ruff_text_size Unify line size settings between ruff and the formatter (#6873) 2023-08-28 06:44:56 +00:00
ruff_wasm Introduce `FormatterSettings` (#7545) 2023-09-21 08:01:24 +02:00
ruff_workspace Fix the default indent style to tab (#7576) 2023-09-21 15:42:55 +00:00