From 3a544b6c295f8f31810e505e52a73fcfa4f01dfb Mon Sep 17 00:00:00 2001 From: PyCharm Automation Bot Date: Mon, 2 Feb 2026 11:43:23 +0000 Subject: [PATCH] PY-87327 Update typeshed version to c01356380fd56b42aa49a0aac8a320437fc7f7b9 Closes PY-87327 GitOrigin-RevId: 534518d6a55743f893955f91803db209dee81ab2 --- python/helpers/typeshed/lib/ts_utils/utils.py | 32 +++++- .../typeshed/scripts/create_baseline_stubs.py | 18 ++- python/helpers/typeshed/stdlib/functools.pyi | 4 + .../typeshed/stubs/Authlib/METADATA.toml | 2 +- .../typeshed/stubs/Deprecated/METADATA.toml | 2 +- .../stubs/assertpy/assertpy/assertpy.pyi | 4 +- .../typeshed/stubs/fpdf2/METADATA.toml | 2 +- .../gunicorn/@tests/stubtest_allowlist.txt | 4 + .../typeshed/stubs/gunicorn/METADATA.toml | 2 +- .../jsonschema/jsonschema/exceptions.pyi | 3 +- .../typeshed/stubs/netaddr/METADATA.toml | 2 +- .../typeshed/stubs/psutil/METADATA.toml | 2 +- .../typeshed/stubs/psutil/psutil/_psposix.pyi | 9 +- .../helpers/typeshed/stubs/tqdm/METADATA.toml | 2 +- .../typeshed/stubs/tqdm/tqdm/_dist_ver.pyi | 0 .../helpers/typeshed/stubs/tqdm/tqdm/std.pyi | 2 +- .../typeshed/stubs/ttkthemes/METADATA.toml | 2 +- .../stubs/www-authenticate/METADATA.toml | 2 +- .../typeshed/stubs/yt-dlp/METADATA.toml | 2 +- .../stubs/yt-dlp/yt_dlp/YoutubeDL.pyi | 2 +- .../stubs/yt-dlp/yt_dlp/downloader/soop.pyi | 3 + .../stubs/yt-dlp/yt_dlp/extractor/common.pyi | 107 +++++++++++++++--- .../stubs/yt-dlp/yt_dlp/utils/_utils.pyi | 2 +- .../tests/check_typeshed_structure.py | 4 +- 24 files changed, 168 insertions(+), 46 deletions(-) delete mode 100644 python/helpers/typeshed/stubs/tqdm/tqdm/_dist_ver.pyi create mode 100644 python/helpers/typeshed/stubs/yt-dlp/yt_dlp/downloader/soop.pyi diff --git a/python/helpers/typeshed/lib/ts_utils/utils.py b/python/helpers/typeshed/lib/ts_utils/utils.py index bf87def015bf..d7dd6ac0fcba 100644 --- a/python/helpers/typeshed/lib/ts_utils/utils.py +++ b/python/helpers/typeshed/lib/ts_utils/utils.py @@ -28,6 +28,24 @@ except ImportError: return text +_REMOVE_COMMENT_RE = re.compile( + r""" + (\"(?:\\.|[^\\\"])*?\") # matches literal strings + | + (\/\*.*?\*\/ | \/\/[^\r\n]*?(?:[\r\n])) # matches single- and multi-line comments + """, + re.DOTALL | re.VERBOSE, +) +_REMOVE_TRAILING_COMMA_RE = re.compile( + r""" + (\"(?:\\.|[^\\\"])*?\") # matches literal strings + | + ,\s*([\]}]) # matches commas before '}' or ']' + """, + re.DOTALL | re.VERBOSE, +) + + PYTHON_VERSION: Final = f"{sys.version_info.major}.{sys.version_info.minor}" @@ -35,13 +53,15 @@ def strip_comments(text: str) -> str: return text.split("#")[0].strip() -def json5_to_json(text: str) -> str: - """Incomplete conversion from JSON5-like input to valid JSON.""" - # Remove full-line // comments only - # (Can not remove inline comments) - text = re.sub(r"(?m)^\s*//.*\n?", "", text) +def jsonc_to_json(text: str) -> str: + """Conversion from JSONC format input to valid JSON.""" + # Remove comments + if not text.endswith("\n"): + text += "\n" + text = _REMOVE_COMMENT_RE.sub(lambda m: m.group(1) or "", text) + # Remove trailing commas before } or ] - text = re.sub(r",\s*([}\]])", r"\1", text) + text = _REMOVE_TRAILING_COMMA_RE.sub(lambda m: m.group(1) or m.group(2), text) return text diff --git a/python/helpers/typeshed/scripts/create_baseline_stubs.py b/python/helpers/typeshed/scripts/create_baseline_stubs.py index 2928bb943b6e..04b2d8617c8c 100644 --- a/python/helpers/typeshed/scripts/create_baseline_stubs.py +++ b/python/helpers/typeshed/scripts/create_baseline_stubs.py @@ -105,12 +105,18 @@ async def get_upstream_repo_url(project: str) -> str | None: # Remove `www.`; replace `http://` with `https://` url = re.sub(r"^(https?://)?(www\.)?", "https://", url_to_check) netloc = urllib.parse.urlparse(url).netloc - if netloc in {"gitlab.com", "github.com", "bitbucket.org", "foss.heptapod.net"}: - # truncate to https://site.com/user/repo - upstream_repo_url = "/".join(url.split("/")[:5]) - async with session.get(upstream_repo_url) as response: - if response.status == HTTPStatus.OK: - return upstream_repo_url + if netloc not in {"gitlab.com", "github.com", "bitbucket.org", "foss.heptapod.net"}: + continue + # truncate to https://site.com/user/repo + upstream_repo_url = "/".join(url.split("/")[:5]) + async with session.get(upstream_repo_url, allow_redirects=True) as response: + if response.status != HTTPStatus.OK: + continue + # final url after redirects + final_url = str(response.url) + # normalize again (in case redirect added extra path) + final_repo_url = "/".join(final_url.split("/")[:5]) + return final_repo_url return None diff --git a/python/helpers/typeshed/stdlib/functools.pyi b/python/helpers/typeshed/stdlib/functools.pyi index 52d0d0958134..57bc3f179f7a 100644 --- a/python/helpers/typeshed/stdlib/functools.pyi +++ b/python/helpers/typeshed/stdlib/functools.pyi @@ -63,6 +63,10 @@ class _lru_cache_wrapper(Generic[_T_co]): def __copy__(self) -> _lru_cache_wrapper[_T_co]: ... def __deepcopy__(self, memo: Any, /) -> _lru_cache_wrapper[_T_co]: ... + # as with ``Callable``, we'll assume that these attributes exist + __name__: str + __qualname__: str + @overload def lru_cache(maxsize: int | None = 128, typed: bool = False) -> Callable[[Callable[..., _T]], _lru_cache_wrapper[_T]]: ... @overload diff --git a/python/helpers/typeshed/stubs/Authlib/METADATA.toml b/python/helpers/typeshed/stubs/Authlib/METADATA.toml index b8a8459de205..16f55ee724c6 100644 --- a/python/helpers/typeshed/stubs/Authlib/METADATA.toml +++ b/python/helpers/typeshed/stubs/Authlib/METADATA.toml @@ -1,3 +1,3 @@ version = "1.6.6" -upstream_repository = "https://github.com/lepture/authlib" +upstream_repository = "https://github.com/authlib/authlib" requires = ["cryptography"] diff --git a/python/helpers/typeshed/stubs/Deprecated/METADATA.toml b/python/helpers/typeshed/stubs/Deprecated/METADATA.toml index d56539265994..fefce48a34ce 100644 --- a/python/helpers/typeshed/stubs/Deprecated/METADATA.toml +++ b/python/helpers/typeshed/stubs/Deprecated/METADATA.toml @@ -1,3 +1,3 @@ version = "~=1.3.1" -upstream_repository = "https://github.com/tantale/deprecated" +upstream_repository = "https://github.com/laurent-laporte-pro/deprecated" requires = [] diff --git a/python/helpers/typeshed/stubs/assertpy/assertpy/assertpy.pyi b/python/helpers/typeshed/stubs/assertpy/assertpy/assertpy.pyi index 5366825bcbd2..922a86dcf426 100644 --- a/python/helpers/typeshed/stubs/assertpy/assertpy/assertpy.pyi +++ b/python/helpers/typeshed/stubs/assertpy/assertpy/assertpy.pyi @@ -69,5 +69,5 @@ def assert_that(val: _V, description: str = "") -> AssertionBuilder[_V]: ... def assert_warn(val: _V, description: str = "", logger: logging.Logger | None = None) -> AssertionBuilder: ... def fail(msg: str = "") -> None: ... def soft_fail(msg: str = "") -> None: ... -def add_extension(func: Callable[[AssertionBuilder], AssertionBuilder]) -> None: ... -def remove_extension(func: Callable[[AssertionBuilder], AssertionBuilder]) -> None: ... +def add_extension(func: Callable[..., AssertionBuilder[Any]]) -> None: ... +def remove_extension(func: Callable[..., AssertionBuilder[Any]]) -> None: ... diff --git a/python/helpers/typeshed/stubs/fpdf2/METADATA.toml b/python/helpers/typeshed/stubs/fpdf2/METADATA.toml index 99ca1632cb80..640beb3f1d8f 100644 --- a/python/helpers/typeshed/stubs/fpdf2/METADATA.toml +++ b/python/helpers/typeshed/stubs/fpdf2/METADATA.toml @@ -1,5 +1,5 @@ version = "2.8.4" -upstream_repository = "https://github.com/PyFPDF/fpdf2" +upstream_repository = "https://github.com/py-pdf/fpdf2" requires = ["Pillow>=10.3.0"] [tool.stubtest] diff --git a/python/helpers/typeshed/stubs/gunicorn/@tests/stubtest_allowlist.txt b/python/helpers/typeshed/stubs/gunicorn/@tests/stubtest_allowlist.txt index 47e466ac9ec9..c5b7678827c3 100644 --- a/python/helpers/typeshed/stubs/gunicorn/@tests/stubtest_allowlist.txt +++ b/python/helpers/typeshed/stubs/gunicorn/@tests/stubtest_allowlist.txt @@ -3,3 +3,7 @@ gunicorn._types # .pyi file doesn't exist gunicorn.__main__ + +# Internal API stuff: +gunicorn.config.Config.forwarded_allow_networks +gunicorn.config.Config.proxy_allow_networks diff --git a/python/helpers/typeshed/stubs/gunicorn/METADATA.toml b/python/helpers/typeshed/stubs/gunicorn/METADATA.toml index c51c9ac86e68..16f90a25b5a2 100644 --- a/python/helpers/typeshed/stubs/gunicorn/METADATA.toml +++ b/python/helpers/typeshed/stubs/gunicorn/METADATA.toml @@ -1,4 +1,4 @@ -version = "24.1.0" +version = "24.1.*" upstream_repository = "https://github.com/benoitc/gunicorn" requires = ["types-gevent"] diff --git a/python/helpers/typeshed/stubs/jsonschema/jsonschema/exceptions.pyi b/python/helpers/typeshed/stubs/jsonschema/jsonschema/exceptions.pyi index 1560375dabb6..aef0c616e705 100644 --- a/python/helpers/typeshed/stubs/jsonschema/jsonschema/exceptions.pyi +++ b/python/helpers/typeshed/stubs/jsonschema/jsonschema/exceptions.pyi @@ -6,7 +6,6 @@ from typing_extensions import Self, TypeAlias, deprecated from ._types import TypeChecker from ._utils import Unset -from .protocols import Validator _RelevanceFuncType: TypeAlias = Callable[[ValidationError], SupportsRichComparison] @@ -21,7 +20,7 @@ class _Error(Exception): relative_schema_path: deque[str | int] context: list[ValidationError] cause: Exception | None - validator: Validator | Unset + validator: str | Unset validator_value: Any | Unset instance: Any | Unset schema: Mapping[str, Any] | bool | Unset diff --git a/python/helpers/typeshed/stubs/netaddr/METADATA.toml b/python/helpers/typeshed/stubs/netaddr/METADATA.toml index 4295beb3b81d..770e9a0b2112 100644 --- a/python/helpers/typeshed/stubs/netaddr/METADATA.toml +++ b/python/helpers/typeshed/stubs/netaddr/METADATA.toml @@ -1,2 +1,2 @@ version = "1.3.*" -upstream_repository = "https://github.com/drkjam/netaddr" +upstream_repository = "https://github.com/netaddr/netaddr" diff --git a/python/helpers/typeshed/stubs/psutil/METADATA.toml b/python/helpers/typeshed/stubs/psutil/METADATA.toml index c8c446849826..e09e37981e46 100644 --- a/python/helpers/typeshed/stubs/psutil/METADATA.toml +++ b/python/helpers/typeshed/stubs/psutil/METADATA.toml @@ -1,4 +1,4 @@ -version = "7.2.1" +version = "7.2.2" upstream_repository = "https://github.com/giampaolo/psutil" [tool.stubtest] diff --git a/python/helpers/typeshed/stubs/psutil/psutil/_psposix.pyi b/python/helpers/typeshed/stubs/psutil/psutil/_psposix.pyi index 8a9e73ca1824..69694bfa4490 100644 --- a/python/helpers/typeshed/stubs/psutil/psutil/_psposix.pyi +++ b/python/helpers/typeshed/stubs/psutil/psutil/_psposix.pyi @@ -58,16 +58,21 @@ class Negsignal(enum.IntEnum): SIGSTKFLT = -16 def negsig_to_enum(num: int) -> int: ... -def wait_pid( +def convert_exit_code(status: int) -> int: ... +def wait_pid_posix( pid: int, timeout: float | None = None, - proc_name: str | None = None, _waitpid: Unused = ..., _timer: Callable[[], float] = ..., _min: Callable[..., Incomplete] = ..., _sleep: Callable[[float], None] = ..., _pid_exists: Callable[[int], bool] = ..., ) -> int | None: ... +def wait_pid_pidfd_open(pid: int, timeout: float | None = None) -> int | None: ... +def wait_pid_kqueue(pid: int, timeout: float | None = None) -> int | None: ... +def can_use_pidfd_open() -> bool: ... +def can_use_kqueue() -> bool: ... +def wait_pid(pid: int, timeout: float | None = None) -> int | None: ... if sys.platform == "darwin": def disk_usage(path: StrOrBytesPath) -> ntp.sdiskusage: ... diff --git a/python/helpers/typeshed/stubs/tqdm/METADATA.toml b/python/helpers/typeshed/stubs/tqdm/METADATA.toml index f218397eb207..6ae7d1ea3b9c 100644 --- a/python/helpers/typeshed/stubs/tqdm/METADATA.toml +++ b/python/helpers/typeshed/stubs/tqdm/METADATA.toml @@ -1,4 +1,4 @@ -version = "4.67.*" +version = "4.67.2" upstream_repository = "https://github.com/tqdm/tqdm" requires = ["types-requests"] diff --git a/python/helpers/typeshed/stubs/tqdm/tqdm/_dist_ver.pyi b/python/helpers/typeshed/stubs/tqdm/tqdm/_dist_ver.pyi deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/python/helpers/typeshed/stubs/tqdm/tqdm/std.pyi b/python/helpers/typeshed/stubs/tqdm/tqdm/std.pyi index e5e84eeec8a4..975e7170fe97 100644 --- a/python/helpers/typeshed/stubs/tqdm/tqdm/std.pyi +++ b/python/helpers/typeshed/stubs/tqdm/tqdm/std.pyi @@ -23,7 +23,7 @@ class TqdmTypeError(TypeError): ... class TqdmKeyError(KeyError): ... class TqdmWarning(Warning): - def __init__(self, msg, fp_write=None, *a, **k) -> None: ... + def __init__(self, msg, fp_write=None) -> None: ... class TqdmExperimentalWarning(TqdmWarning, FutureWarning): ... class TqdmDeprecationWarning(TqdmWarning, DeprecationWarning): ... diff --git a/python/helpers/typeshed/stubs/ttkthemes/METADATA.toml b/python/helpers/typeshed/stubs/ttkthemes/METADATA.toml index 7204a09bf9c6..de555ee078b4 100644 --- a/python/helpers/typeshed/stubs/ttkthemes/METADATA.toml +++ b/python/helpers/typeshed/stubs/ttkthemes/METADATA.toml @@ -1,2 +1,2 @@ version = "3.3.*" -upstream_repository = "https://github.com/RedFantom/ttkthemes" +upstream_repository = "https://github.com/TkinterEP/ttkthemes" diff --git a/python/helpers/typeshed/stubs/www-authenticate/METADATA.toml b/python/helpers/typeshed/stubs/www-authenticate/METADATA.toml index 189310bac907..2e7e670d98b4 100644 --- a/python/helpers/typeshed/stubs/www-authenticate/METADATA.toml +++ b/python/helpers/typeshed/stubs/www-authenticate/METADATA.toml @@ -1,2 +1,2 @@ version = "0.9.*" -upstream_repository = "https://github.com/alexsdutton/www-authenticate" +upstream_repository = "https://github.com/alexdutton/www-authenticate" diff --git a/python/helpers/typeshed/stubs/yt-dlp/METADATA.toml b/python/helpers/typeshed/stubs/yt-dlp/METADATA.toml index 02ff49efc0c3..d2988094d4eb 100644 --- a/python/helpers/typeshed/stubs/yt-dlp/METADATA.toml +++ b/python/helpers/typeshed/stubs/yt-dlp/METADATA.toml @@ -1,3 +1,3 @@ -version = "2025.12.08" +version = "2026.01.31" upstream_repository = "https://github.com/yt-dlp/yt-dlp" requires = ["websockets"] diff --git a/python/helpers/typeshed/stubs/yt-dlp/yt_dlp/YoutubeDL.pyi b/python/helpers/typeshed/stubs/yt-dlp/yt_dlp/YoutubeDL.pyi index 5f00db4b5c3f..785d62ddc96c 100644 --- a/python/helpers/typeshed/stubs/yt-dlp/yt_dlp/YoutubeDL.pyi +++ b/python/helpers/typeshed/stubs/yt-dlp/yt_dlp/YoutubeDL.pyi @@ -89,7 +89,7 @@ class YoutubeDL: def dl(self, name: str, info: _InfoDict, subtitle: bool = False, test: bool = False) -> bool: ... def existing_file(self, filepaths: Iterable[str], *, default_overwrite: bool = True) -> str | None: ... def process_info(self, info_dict: _InfoDict) -> None: ... - def download(self, url_list: Collection[str]) -> None: ... + def download(self, url_list: Collection[str]) -> int: ... def download_with_info_file(self, info_filename: str) -> int: ... @staticmethod def sanitize_info(info_dict: _InfoDict, remove_private_keys: bool = False) -> _InfoDict | None: ... diff --git a/python/helpers/typeshed/stubs/yt-dlp/yt_dlp/downloader/soop.pyi b/python/helpers/typeshed/stubs/yt-dlp/yt_dlp/downloader/soop.pyi new file mode 100644 index 000000000000..0b74e77909cf --- /dev/null +++ b/python/helpers/typeshed/stubs/yt-dlp/yt_dlp/downloader/soop.pyi @@ -0,0 +1,3 @@ +from .common import FileDownloader + +class SoopVodFD(FileDownloader): ... diff --git a/python/helpers/typeshed/stubs/yt-dlp/yt_dlp/extractor/common.pyi b/python/helpers/typeshed/stubs/yt-dlp/yt_dlp/extractor/common.pyi index ab893d27e8e0..d977586c5182 100644 --- a/python/helpers/typeshed/stubs/yt-dlp/yt_dlp/extractor/common.pyi +++ b/python/helpers/typeshed/stubs/yt-dlp/yt_dlp/extractor/common.pyi @@ -1,5 +1,5 @@ import re -from _typeshed import Unused +from _typeshed import Incomplete, Unused from collections.abc import Callable, Collection, Iterable, Iterator, Mapping, Sequence from functools import cached_property from json.decoder import JSONDecoder @@ -8,6 +8,8 @@ from typing_extensions import Never, Required, TypeAlias, deprecated from urllib.request import Request, _DataType from xml.etree import ElementTree as ET +from yt_dlp.utils import PagedList + from ..cache import Cache from ..cookies import LenientSimpleCookie, YoutubeDLCookieJar from ..networking.common import Response, _RequestData @@ -17,22 +19,101 @@ from ..YoutubeDL import YoutubeDL @type_check_only class _InfoDict(TypedDict, total=False): - age_limit: int - availability: Literal["private", "premium_only", "subscriber_only", "needs_auth", "unlisted", "public"] | None - available_at: int - creator: str | None - comment_count: int | None - duration: int | None - formats: list[dict[str, Any]] | None id: Required[str] - like_count: int | None - tags: list[str] | None - thumbnail: str | None - timestamp: int | float | None title: str | None - uploader: str | None + formats: list[dict[str, Any]] | None + available_at: int url: str | None + ext: str | None + format: str | None + player_url: str | None + direct: bool | None + alt_title: str | None + display_id: Incomplete + thumbnails: list[dict[str, Incomplete]] | None + thumbnail: str | None + description: str | None + uploader: str | None + license: str | None + creators: list[str] | None + timestamp: int | float | None + upload_date: Incomplete + release_timestamp: Incomplete + release_date: Incomplete + release_year: Incomplete + modified_timestamp: Incomplete + modified_date: Incomplete + uploader_id: Incomplete + uploader_url: str | None + channel: str | None + channel_id: Incomplete + channel_url: str | None + channel_follower_count: int | None + channel_is_verified: Incomplete + location: Incomplete + subtitles: Incomplete + automatic_captions: Incomplete + duration: int | None + view_count: int | None + concurrent_view_count: int | None + save_count: int | None + like_count: int | None + dislike_count: int | None + repost_count: int | None + average_rating: Incomplete + comment_count: int | None + comments: Incomplete + age_limit: int + webpage_url: str | None + categories: list[str] | None + tags: list[str] | None + cast: list[Incomplete] | None + is_live: bool | None + was_live: bool | None + live_status: Literal["is_live", "is_upcoming", "was_live", "not_live", "post_live"] | None + start_time: Incomplete + end_time: Incomplete + chapters: Incomplete + heatmap: Incomplete + playable_in_embed: bool | str | None + availability: Literal["private", "premium_only", "subscriber_only", "needs_auth", "unlisted", "public"] | None + media_type: str | None + _old_archive_ids: Incomplete + _format_sort_fields: Incomplete + chapter: str | None + chapter_number: int | None + chapter_id: str | None + series: str | None + series_id: str | None + season: str | None + season_number: int | None + season_id: str | None + episode: Incomplete + episode_number: int | None + episode_id: str | None + track: str | None + track_number: int | None + track_id: str | None + artists: list[str] | None + composers: list[str] | None + genres: list[str] | None + album: str | None + album_type: str | None + album_artists: list[str] | None + disc_number: int | None + section_start: Incomplete + section_end: Incomplete + rows: int | None + columns: int | None + playlist_count: int | None + entries: Iterable[_InfoDict] | PagedList requested_formats: Iterable[_InfoDict] + # deprecated fields: + composer: Incomplete + artist: Incomplete + genre: Incomplete + album_artist: Incomplete + creator: str | None _StrNoDefaultOrNone: TypeAlias = str | None | type[NO_DEFAULT] _T = TypeVar("_T") diff --git a/python/helpers/typeshed/stubs/yt-dlp/yt_dlp/utils/_utils.pyi b/python/helpers/typeshed/stubs/yt-dlp/yt_dlp/utils/_utils.pyi index b883127d346a..73e25f4453da 100644 --- a/python/helpers/typeshed/stubs/yt-dlp/yt_dlp/utils/_utils.pyi +++ b/python/helpers/typeshed/stubs/yt-dlp/yt_dlp/utils/_utils.pyi @@ -274,7 +274,7 @@ def extract_timezone(date_str: str, default: Any = None) -> tuple[timedelta, str def parse_iso8601(date_str: str, delimiter: str = "T", timezone: type[NO_DEFAULT] | Any | None = None) -> int: ... def date_formats(day_first: bool = True) -> list[str]: ... def unified_strdate(date_str: str, day_first: bool = True) -> str: ... -def unified_timestamp(date_str: str, day_first: bool = True) -> int: ... +def unified_timestamp(date_str: str, day_first: bool = True, tz_offset: float = 0) -> int: ... def determine_ext(url: str, default_ext: str = "unknown_video") -> str: ... def subtitles_filename(filename: str, sub_lang: str, sub_format: str, expected_real_ext: str | None = None) -> str: ... def datetime_from_str(date_str: str, precision: str = "auto", format: str = "%Y%m%d") -> datetime: ... diff --git a/python/helpers/typeshed/tests/check_typeshed_structure.py b/python/helpers/typeshed/tests/check_typeshed_structure.py index dd986b3f3e8b..8c3892ff04a6 100644 --- a/python/helpers/typeshed/tests/check_typeshed_structure.py +++ b/python/helpers/typeshed/tests/check_typeshed_structure.py @@ -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", [])