Skip to content

Commit a73e5c4

Browse files
Further cleanup
1 parent ad79992 commit a73e5c4

1 file changed

Lines changed: 11 additions & 15 deletions

File tree

‎conformance/src/type_checker.py‎

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -502,16 +502,6 @@ def parse_errors(self, output: Sequence[str]) -> dict[int, list[str]]:
502502
return line_to_errors
503503

504504

505-
TYPE_CHECKERS: Sequence[TypeChecker] = (
506-
MypyTypeChecker(),
507-
PyrightTypeChecker(),
508-
ZubanLSTypeChecker(),
509-
PyreflyTypeChecker(),
510-
PycroscopeTypeChecker(),
511-
TyTypeChecker(),
512-
)
513-
514-
515505
class BasiliskTypeChecker(TypeChecker):
516506
@property
517507
def name(self) -> str:
@@ -547,7 +537,7 @@ def get_version(self) -> str:
547537
)
548538
return proc.stdout.strip()
549539

550-
def run_tests(self, test_files: "Sequence[str]") -> dict[str, str]:
540+
def run_tests(self, test_files: Sequence[str]) -> dict[str, str]:
551541
# Basilisk emits a machine-readable JSON array of diagnostics. Each test
552542
# file is a self-contained module, so we check them individually and key
553543
# the flattened text output by file name for the scoring pass.
@@ -605,7 +595,7 @@ def sort_key(diagnostic: dict[str, object]) -> tuple[str, int, int, str, str, st
605595
results_dict[file_name] = results_dict.get(file_name, "") + line_text
606596
return results_dict
607597

608-
def parse_errors(self, output: "Sequence[str]") -> dict[int, list[str]]:
598+
def parse_errors(self, output: Sequence[str]) -> dict[int, list[str]]:
609599
# aliases_implicit.py:115:5: error: Invalid type expression ... [annotations_forward_refs]
610600
line_to_errors: dict[int, list[str]] = {}
611601
for line in output:
@@ -620,6 +610,12 @@ def parse_errors(self, output: "Sequence[str]") -> dict[int, list[str]]:
620610
return line_to_errors
621611

622612

623-
# Register Basilisk without depending on upstream's tuple contents: extend
624-
# whatever `TYPE_CHECKERS` the suite defined. `--only-run basilisk` selects it.
625-
TYPE_CHECKERS = tuple(TYPE_CHECKERS) + (BasiliskTypeChecker(),)
613+
TYPE_CHECKERS: Sequence[TypeChecker] = (
614+
MypyTypeChecker(),
615+
PyrightTypeChecker(),
616+
ZubanLSTypeChecker(),
617+
PyreflyTypeChecker(),
618+
PycroscopeTypeChecker(),
619+
TyTypeChecker(),
620+
BasiliskTypeChecker(),
621+
)

0 commit comments

Comments
 (0)