Consider using `TypedDict` for 2nd `ExceptionHandler` parameter
Open
- Dominant language
- Python
- Stars
- 929
- Forks
- 68
- Avg merge
- 1m
- Merged PRs (30d)
- 2
Description
The `ExceptionHandler` type is currently defined as taking a `dict[str, Any]` as its 2nd parameter:
https://github.com/aio-libs/aiojobs/blob/70fe9e5dfd83bb5a9d0ce8d75bea2832b674da68/aiojobs/_scheduler.py#L29
But the docs explain that the set of keys of this dictionary is actually static:
https://github.com/aio-libs/aiojobs/blob/70fe9e5dfd83bb5a9d0ce8d75bea2832b674da68/docs/api.rst?plain=1#L161-L168
So it would be better for type-safety (and things that come with it like IDE completion) if this used a [`TypedDict`](https://docs.python.org/3/library/typing.html#typing.TypedDict) instead of a generic `dict[str, Any]`.
Contributor guide
Assessment
This issue has not been assessed yet.