ruff/crates
konsti 8184235f93
Try statements have a body: Fix formatter instability (#5558)
## Summary

The following code was previously leading to unstable formatting:
```python
try:
    try:
        pass
    finally:
        print(1)  # issue7208
except A:
    pass
```
The comment would be formatted as a trailing comment of `try` which is
unstable as an end-of-line comment gets two extra whitespaces.

This was originally found in
99b00efd5e/Lib/getpass.py (L68-L91)

## Test Plan

I added a regression test
2023-07-06 16:07:47 +02:00
..
flake8_to_ruff Bump version to 0.0.277 (#5515) 2023-07-04 17:31:32 -04:00
ruff Replace stat mapping with match statement (#5548) 2023-07-05 23:42:21 +00:00
ruff_benchmark Create PyFormatOptions 2023-06-26 14:02:17 +02:00
ruff_cache Only use a single cache file per Python package (#5117) 2023-06-19 17:46:13 +02:00
ruff_cli Run cargo update (#5534) 2023-07-05 12:34:15 -04:00
ruff_dev Add separate configuration for MkDocs Insiders plugins (#5544) 2023-07-05 18:40:21 -04:00
ruff_diagnostics Use consistent Cargo.toml metadata in all crates (#5015) 2023-06-12 00:02:40 +00:00
ruff_formatter Show BestFitting mode if it isn't FirstLine (#5452) 2023-06-30 09:49:00 +00:00
ruff_index Add unreachable code rule (#5384) 2023-07-04 14:27:23 +00:00
ruff_macros Add unreachable code rule (#5384) 2023-07-04 14:27:23 +00:00
ruff_python_ast Try statements have a body: Fix formatter instability (#5558) 2023-07-06 16:07:47 +02:00
ruff_python_formatter Try statements have a body: Fix formatter instability (#5558) 2023-07-06 16:07:47 +02:00
ruff_python_resolver Format let-else with rustfmt nightly (#5461) 2023-07-03 02:13:35 +00:00
ruff_python_semantic Enable attribute lookups via semantic model (#5536) 2023-07-05 15:19:14 -04:00
ruff_python_stdlib Remove some additional manual iterator matches (#5482) 2023-07-03 16:29:59 +00:00
ruff_python_whitespace Use consistent Cargo.toml metadata in all crates (#5015) 2023-06-12 00:02:40 +00:00
ruff_rustpython Use consistent Cargo.toml metadata in all crates (#5015) 2023-06-12 00:02:40 +00:00
ruff_textwrap Use consistent Cargo.toml metadata in all crates (#5015) 2023-06-12 00:02:40 +00:00
ruff_wasm [pyupgrade] Restore the keep-runtime-typing setting (#5470) 2023-07-03 02:11:31 +00:00