From 8d64747d3453662370db904e5875fa04b06c80d4 Mon Sep 17 00:00:00 2001 From: Evan Rittenhouse Date: Sat, 29 Apr 2023 17:41:04 -0500 Subject: [PATCH] Remove `pyright` comment prefix from PYI033 checks (#4152) --- .../ruff/src/rules/flake8_pyi/rules/type_comment_in_stub.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ruff/src/rules/flake8_pyi/rules/type_comment_in_stub.rs b/crates/ruff/src/rules/flake8_pyi/rules/type_comment_in_stub.rs index c699875e22..f2bc89699f 100644 --- a/crates/ruff/src/rules/flake8_pyi/rules/type_comment_in_stub.rs +++ b/crates/ruff/src/rules/flake8_pyi/rules/type_comment_in_stub.rs @@ -50,7 +50,7 @@ pub fn type_comment_in_stub(tokens: &[LexResult]) -> Vec { } static TYPE_COMMENT_REGEX: Lazy = - Lazy::new(|| Regex::new(r"^#\s*(type|pyright):\s*([^#]+)(\s*#.*?)?$").unwrap()); + Lazy::new(|| Regex::new(r"^#\s*type:\s*([^#]+)(\s*#.*?)?$").unwrap()); static TYPE_IGNORE_REGEX: Lazy = - Lazy::new(|| Regex::new(r"^#\s*(type|pyright):\s*ignore([^#]+)?(\s*#.*?)?$").unwrap()); + Lazy::new(|| Regex::new(r"^#\s*type:\s*ignore([^#]+)?(\s*#.*?)?$").unwrap());