Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions stdlib/json/decoder.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ class JSONDecoder:
parse_constant: Callable[[str], Any]
strict: bool
object_pairs_hook: Callable[[list[tuple[str, Any]]], Any]
parse_object: Callable[..., Any]
parse_array: Callable[..., Any]
parse_string: Callable[..., Any]
memo: dict[Any, Any]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, but we should add the actual arguments and return types here. Same for the actual types in the memo dict. Alternatively, we could use Incomplete (from _typeshed) as a marker for now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a good way to tell they are the same thing, or have we copy the signature of the functions

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think copying the signature is fine where that makes sense.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JSONArray and JSONObject wasnt exits so i tried implenting it but its so complex

def __init__(
self,
*,
Expand Down