Omit code frames for fixes with empty ranges (#12304)

## Summary

Closes https://github.com/astral-sh/ruff/issues/12291.

## Test Plan

```shell
❯ cargo run check ../uv/foo --select INP
/Users/crmarsh/workspace/uv/foo/bar/baz.py:1:1: INP001 File `/Users/crmarsh/workspace/uv/foo/bar/baz.py` is part of an implicit namespace package. Add an `__init__.py`.
Found 1 error.
```
This commit is contained in:
Charlie Marsh 2024-07-12 11:21:28 -04:00 committed by GitHub
parent e58713e2ac
commit 940df67823
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
42 changed files with 11 additions and 457 deletions

View file

@ -2,11 +2,3 @@
source: crates/ruff_linter/src/rules/pydocstyle/mod.rs
---
D.py:1:1: D100 Missing docstring in public module
|
1 | # No docstring, so we can test D100
| D100
2 | from functools import wraps
3 | import os
|

View file

@ -2,7 +2,3 @@
source: crates/ruff_linter/src/rules/pydocstyle/mod.rs
---
D100_pub.py:1:1: D100 Missing docstring in public module
|
|

View file

@ -2,7 +2,3 @@
source: crates/ruff_linter/src/rules/pydocstyle/mod.rs
---
__init__.py:1:1: D104 Missing docstring in public package
|
|

View file

@ -2,12 +2,6 @@
source: crates/ruff_linter/src/rules/pydocstyle/mod.rs
---
all.py:1:1: D100 Missing docstring in public module
|
1 | def public_func():
| D100
2 | pass
|
all.py:1:5: D103 Missing docstring in public function
|
1 | def public_func():
@ -30,5 +24,3 @@ all.py:10:11: D106 Missing docstring in public nested class
| ^^^^^^^^^^^^^^^^^ D106
11 | pass
|