ruff/crates/ruff_linter
Thomas Mattone ae26fa020c
[flake8-pyi] Preserve inline comment in ellipsis removal (PYI013) (#19399)
## Summary

Fixes #19385.

Based on [unnecessary-placeholder
(PIE790)](https://docs.astral.sh/ruff/rules/unnecessary-placeholder/)
behavior, [ellipsis-in-non-empty-class-body
(PYI013)](https://docs.astral.sh/ruff/rules/ellipsis-in-non-empty-class-body/)
now safely preserve inline comment on ellipsis removal.

## Test Plan

A new test class was added:

```python
class NonEmptyChildWithInlineComment:
    value: int
    ... # preserve me
```

with the following expected fix:

```python
class NonEmptyChildWithInlineComment:
    value: int
    # preserve me
```
2025-07-29 15:06:04 -04:00
..
resources [flake8-pyi] Preserve inline comment in ellipsis removal (PYI013) (#19399) 2025-07-29 15:06:04 -04:00
src [flake8-pyi] Preserve inline comment in ellipsis removal (PYI013) (#19399) 2025-07-29 15:06:04 -04:00
Cargo.toml Bump 0.12.5 (#19528) 2025-07-24 09:12:50 -04:00