From b13f8e37a300379b359356b1417ef80641d80e04 Mon Sep 17 00:00:00 2001 From: anthony sottile <103459774+asottile-sentry@users.noreply.github.com> Date: Tue, 8 Nov 2022 12:30:05 -0500 Subject: [PATCH] add default for simplejson.JSONEncoder.iterencode (#9135) https://github.com/simplejson/simplejson/blob/43645252224d4e529c22cb78ac42f241d6426073/simplejson/encoder.py#L304 --- stubs/simplejson/@tests/stubtest_allowlist.txt | 4 ---- stubs/simplejson/simplejson/encoder.pyi | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/stubs/simplejson/@tests/stubtest_allowlist.txt b/stubs/simplejson/@tests/stubtest_allowlist.txt index e55375de8..d3000e8eb 100644 --- a/stubs/simplejson/@tests/stubtest_allowlist.txt +++ b/stubs/simplejson/@tests/stubtest_allowlist.txt @@ -3,16 +3,12 @@ simplejson.JSONDecoder.__init__ simplejson.JSONDecoder.decode simplejson.JSONDecoder.raw_decode simplejson.JSONEncoder.__init__ -simplejson.JSONEncoder.iterencode -simplejson.JSONEncoderForHTML.iterencode simplejson.decoder.JSONDecoder.__init__ simplejson.decoder.JSONDecoder.decode simplejson.decoder.JSONDecoder.raw_decode simplejson.dump simplejson.dumps simplejson.encoder.JSONEncoder.__init__ -simplejson.encoder.JSONEncoder.iterencode -simplejson.encoder.JSONEncoderForHTML.iterencode simplejson.load simplejson.loads simplejson.scanner.JSONDecodeError.__init__ diff --git a/stubs/simplejson/simplejson/encoder.pyi b/stubs/simplejson/simplejson/encoder.pyi index 004545b83..a3603029a 100644 --- a/stubs/simplejson/simplejson/encoder.pyi +++ b/stubs/simplejson/simplejson/encoder.pyi @@ -5,6 +5,6 @@ class JSONEncoder: def __init__(self, *args: Any, **kwargs: Any) -> None: ... def encode(self, o: Any) -> str: ... def default(self, o: Any) -> NoReturn: ... - def iterencode(self, o: Any, _one_shot: bool) -> Iterator[str]: ... + def iterencode(self, o: Any, _one_shot: bool = ...) -> Iterator[str]: ... class JSONEncoderForHTML(JSONEncoder): ...