mirror of
https://github.com/astral-sh/ruff.git
synced 2026-05-06 08:56:57 -04:00
[ty] Respect commented-out lines in the conformance test suite (#24932)
## Summary We were treating this line from the conformance tests as a false negative: https://github.com/python/typing/blob/5a701a037b5243df1f39622b642893d865f06205/conformance/tests/generics_syntax_infer_variance.py#L72
This commit is contained in:
@@ -450,6 +450,10 @@ def collect_expected_diagnostics(test_files: Sequence[Path]) -> list[ExpectedErr
|
||||
for file in test_files:
|
||||
for idx, line in enumerate(file.read_text().splitlines(), 1):
|
||||
if match := re.search(CONFORMANCE_ERROR_PATTERN, line):
|
||||
prefix = line[: match.start()].lstrip()
|
||||
if not prefix or prefix.startswith("#"):
|
||||
continue
|
||||
|
||||
errors.append(
|
||||
ExpectedError(
|
||||
description=(match.group("description") or "Missing"),
|
||||
|
||||
Reference in New Issue
Block a user