Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions typings/rapidjson/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ class Decoder:
json: t.Union[str, bytes, t.IO],
chunk_size: t.Optional[int] = 65536,
) -> t.Any: ...
def end_array(self, sequence: t.Sequence) -> t.Sequence: ...
def end_object(self, mapping: t.Mapping) -> t.Mapping: ...
def start_object(self) -> t.Union[t.Sequence, t.Mapping]: ...
def string(self, s: str) -> str: ...

class Encoder:
bytes_mode: _BytesMode
Expand Down Expand Up @@ -214,6 +218,7 @@ class Encoder:
stream: t.Optional[t.IO],
chunk_size: t.Optional[int] = 65536,
) -> t.Optional[str]: ...
def default(self, obj: t.Any) -> _JSONType: ...

@t.final
class RawJSON:
Expand Down
5 changes: 5 additions & 0 deletions typings/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
rapidjson.Encoder.default
rapidjson.Decoder.end_array
rapidjson.Decoder.end_object
rapidjson.Decoder.start_object
rapidjson.Decoder.string