mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-18 19:41:34 +00:00
According to https://docs.python.org/3/library/ast.html#ast-helpers, we expect type_ignores to be always be empty, so this adds a debug assert. Test plan: I confirmed that the assertion holdes for the file below and for all the black tests which include a number of `type: ignore` comments. ```python # type: ignore if 1: print("1") # type: ignore # elsebranch # type: ignore else: # type: ignore print("2") # type: ignore while 1: print() # type: ignore ``` |
||
|---|---|---|
| .. | ||
| resources/test/fixtures | ||
| src | ||
| Cargo.toml | ||
| Docs.md | ||
| generate.py | ||
| orphan_rules_in_the_formatter.svg | ||