mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 10:22:24 +00:00
parent
68ada05b00
commit
2835d94ec5
5 changed files with 215 additions and 73 deletions
|
@ -84,11 +84,10 @@ def test( # knot: ignore
|
|||
|
||||
## Can't suppress `revealed-type` diagnostics
|
||||
|
||||
TODO: Emit an error that the rule code is unknown: `unknown-rule`
|
||||
|
||||
```py
|
||||
a = 10
|
||||
# revealed: Literal[10]
|
||||
# error: [unknown-rule] "Unknown rule `revealed-type`"
|
||||
reveal_type(a) # knot: ignore[revealed-type]
|
||||
```
|
||||
|
||||
|
@ -164,3 +163,10 @@ severity: `knot: possibly-undefined-reference=error`
|
|||
|
||||
a = 4 / 0 # error: [division-by-zero]
|
||||
```
|
||||
|
||||
## Unknown rule
|
||||
|
||||
```py
|
||||
# error: [unknown-rule] "Unknown rule `is-equal-14`"
|
||||
a = 10 + 4 # knot: ignore[is-equal-14]
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue