mirror of
https://github.com/astral-sh/ruff
synced 2026-01-08 23:24:31 -05:00
Apply consistent code block labels (#8563)
This ensures the python label is used for all python code blocks for consistency. ## Test Plan Visual inspection of all changes via git client ensuring no other changes were made in error.
This commit is contained in:
@@ -21,7 +21,7 @@ numbers
|
||||
|
||||
...where `numbers.py` contains the following code:
|
||||
|
||||
```py
|
||||
```python
|
||||
from typing import Iterable
|
||||
|
||||
import os
|
||||
@@ -273,7 +273,7 @@ Found 3 errors.
|
||||
Any lint rule can be ignored by adding a `# noqa` comment to the line in question. For example,
|
||||
let's ignore the `UP035` rule for the `Iterable` import:
|
||||
|
||||
```py
|
||||
```python
|
||||
from typing import Iterable # noqa: UP035
|
||||
|
||||
|
||||
@@ -294,7 +294,7 @@ Found 3 errors.
|
||||
If we want to ignore a rule for an entire file, we can add the line `# ruff: noqa: {code}` anywhere
|
||||
in the file, preferably towards the top, like so:
|
||||
|
||||
```py
|
||||
```python
|
||||
# ruff: noqa: UP035
|
||||
from typing import Iterable
|
||||
|
||||
|
||||
Reference in New Issue
Block a user