dropbox / dropbox/sqlalchemy-stubs
Change JSON type from Dict to Mapping
- Dominant language
- Python
- Stars
- 583
- Forks
- 96
- PR merge metrics
- No merged PRs in 30d
Description
Would it be possible to make the type for `JSON` columns accept `Mapping[str, Any]` instead of (in addition to?) `Dict[str, Any]`? My specific use case is I have a fixed JSON schema that I represent with a [`TypedDict`](https://mypy.readthedocs.io/en/latest/more_types.html#typeddict), but this is only compatible with `Mapping`, not `Dict`, so I have to either ignore the type or `cast` it when creating the column.
Even better would be if the plugin could somehow remember that it got a `TypedDict` and return that instead of a plain `Dict` or `Mapping` when you access the column later.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.