[ts_utils] Update jsonc_to_json function (#15325)

This commit is contained in:
Semyon Moroz
2026-01-26 19:29:15 +01:00
committed by GitHub
parent 8397d5678e
commit f0878dea3d
2 changed files with 28 additions and 8 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ from ts_utils.paths import PYRIGHT_CONFIG, REQUIREMENTS_PATH, STDLIB_PATH, STUBS
from ts_utils.utils import (
get_all_testcase_directories,
get_gitignore_spec,
json5_to_json,
jsonc_to_json,
parse_requirements,
parse_stdlib_versions_file,
spec_matches_path,
@@ -178,7 +178,7 @@ def check_requirement_pins() -> None:
def check_pyright_exclude_order() -> None:
"""Check that 'exclude' entries in pyrightconfig.stricter.json are sorted alphabetically."""
text = PYRIGHT_CONFIG.read_text(encoding="utf-8")
text = json5_to_json(text)
text = jsonc_to_json(text)
data = json.loads(text)
exclude: list[str] = data.get("exclude", [])