Skip to content
Myr

fix mypy findings

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

authored by David Lord · committed by David Lord · parent 2d31dce · Browse files · 2 files+14 added−2 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+14 added−2 removed

  • other:+14 added−2 removed

2 files+14 added−2 removed

modified:src/flask/json/provider.py+1 added-1 removed
111 unmodified lines
112 if isinstance(o, (decimal.Decimal, uuid.UUID)):113 return str(o)114115 if dataclasses and dataclasses.is_dataclass(o):116 return dataclasses.asdict(o)116 return dataclasses.asdict(o) # type: ignore[call-overload]117118 if hasattr(o, "__html__"):119 return str(o.__html__())120
95 unmodified lines
modified:src/flask/helpers.py+13 added-1 removed
45 unmodified lines
4647 return val.lower() in ("0", "false", "no")484950@t.overload51def stream_with_context(52 generator_or_function: t.Iterator[t.AnyStr],53) -> t.Iterator[t.AnyStr]: ...545556@t.overload57def stream_with_context(58 generator_or_function: t.Callable[..., t.Iterator[t.AnyStr]],59) -> t.Callable[[t.Iterator[t.AnyStr]], t.Iterator[t.AnyStr]]: ...606162def stream_with_context(63 generator_or_function: t.Iterator[t.AnyStr] | t.Callable[..., t.Iterator[t.AnyStr]],52) -> t.Iterator[t.AnyStr]:64) -> t.Iterator[t.AnyStr] | t.Callable[[t.Iterator[t.AnyStr]], t.Iterator[t.AnyStr]]:65 """Request contexts disappear when the response is started on the server.66 This is done for efficiency reasons and to make it less likely to encounter67 memory leaks with badly written WSGI middlewares. The downside is that if68 you are using streamed responses, the generator cannot access request bound
565 unmodified lines