mirror of
https://github.com/astral-sh/ruff
synced 2026-01-08 15:14:19 -05:00
Treat ty: comments as pragma comments (#18532)
## Summary Add support for ty's `ty:` pragma comments to ruff's formatter and E501 Fixes https://github.com/astral-sh/ruff/issues/18529 ## Test Plan Added test
This commit is contained in:
@@ -26,5 +26,5 @@ pub fn is_pragma_comment(comment: &str) -> bool {
|
||||
// Case-sensitive match against a variety of pragmas that _do_ require a trailing colon.
|
||||
trimmed
|
||||
.split_once(':')
|
||||
.is_some_and(|(maybe_pragma, _)| matches!(maybe_pragma, "isort" | "type" | "pyright" | "pylint" | "flake8" | "ruff"))
|
||||
.is_some_and(|(maybe_pragma, _)| matches!(maybe_pragma, "isort" | "type" | "pyright" | "pylint" | "flake8" | "ruff" | "ty"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user