I'm getting a typing error (with pyright) in python 3.13 with this: ```python with open(path, 'r', encoding='utf-8') as f: config_data = json5.load(f) ``` The error is ``` config.py:752:27 - error: Type of "load" is partially unknown Type of "load" is "(fp: IO[Unknown], *, encoding: str | None = None, cls: Any = None, object_hook: ((Mapping[str, Any]) -> Any) | None = None, parse_float: ((str) -> Any) | None = None, parse_int: ((str) -> Any) | None = None, parse_constant: ((str) -> Any) | None = None, strict: bool = True, object_pairs_hook: ((Iterable[Tuple[str, Any]]) -> Any) | None = None, allow_duplicate_keys: bool = True, consume_trailing: bool = True, start: int | None = None) -> Any" (reportUnknownMemberType) ``` I think it's related to typing.io being removed in python 3.13? (I just tried 3.12.9 -- same error) If I change it to ```python def load( fp: IO[str], *, encoding: Optional[str] = None, ... ``` The error goes away. I'm not positive this is the right fix though :-)
Activity
ggilley commentedon Jul 12, 2025
Never mind. it's a "strict" pyright check. I'll turn it off.
dpranke commentedon Jul 17, 2025
Looks like it's something that can be fixed or improved, though. I'll reopen it. Thanks for reporting!
dpranke commentedon Oct 8, 2026
This is fixed by PR #118.