Skip to content
Myr

fix annotation for json.loads

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Rafael Zimmer · committed by David Lord · parent 69f71b4 · Browse files · 2 files+8 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+8 added−1 removed

  • other:+8 added−1 removed

2 files+8 added−1 removed

modified:src/flask/json/__init__.py+5 added-1 removed
151 unmodified lines
152 _dump_arg_defaults(kwargs, app=app)153 _json.dump(obj, fp, **kwargs)154155156def loads(s: str, app: t.Optional["Flask"] = None, **kwargs: t.Any) -> t.Any:156def loads(157 s: t.Union[str, bytes],158 app: t.Optional["Flask"] = None,159 **kwargs: t.Any,160) -> t.Any:161 """Deserialize an object from a string of JSON.162163 Takes the same arguments as the built-in :func:`json.loads`, with164 some defaults from application configuration.
139 unmodified lines
modified:CHANGES.rst+3 added
3 unmodified lines
4-------------56Unreleased78- Fix type annotation for ``json.loads``, it accepts str or bytes.9 :issue:`4519`101112Version 2.1.113-------------1415Released on 2022-03-30
1267 unmodified lines