mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-16 10:48:23 +00:00
Don't flag pyrefly pragmas as unused code (ERA001) (#19731)
This commit is contained in:
parent
f3e66dd503
commit
b95d22c08e
2 changed files with 12 additions and 0 deletions
|
|
@ -89,3 +89,14 @@ print(1)
|
||||||
# ///
|
# ///
|
||||||
#
|
#
|
||||||
# Foobar
|
# Foobar
|
||||||
|
|
||||||
|
|
||||||
|
# Regression tests for https://github.com/astral-sh/ruff/issues/19713
|
||||||
|
|
||||||
|
# mypy: ignore-errors
|
||||||
|
# pyright: ignore-errors
|
||||||
|
# pyrefly: ignore-errors
|
||||||
|
# ty: ignore[unresolved-import]
|
||||||
|
# pyrefly: ignore[unused-import]
|
||||||
|
|
||||||
|
print(1)
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ static ALLOWLIST_REGEX: LazyLock<Regex> = LazyLock::new(|| {
|
||||||
(?:
|
(?:
|
||||||
# Case-sensitive
|
# Case-sensitive
|
||||||
pyright
|
pyright
|
||||||
|
| pyrefly
|
||||||
| mypy:
|
| mypy:
|
||||||
| type:\s*ignore
|
| type:\s*ignore
|
||||||
| SPDX-License-Identifier:
|
| SPDX-License-Identifier:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue