Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(types): use MutableMapping to type call arguments in asgi middleware
When we bumped `opentelemetry-instrumentation-asgi` to 0.45b0, we got type errors due to the changes introduced by PR open-telemetry#2026. ``` error: Argument 1 to "add_middleware" of "Starlette" has incompatible type "type[AsgiMiddleware]"; expected "type[_MiddlewareClass[[]]]" [arg-type] ``` The problem is that it is specifying the types as `dict`, whereas Starlette requires `MutableMapping`. See https://github.com/encode/starlette/blob/9f16bf5c25e126200701f6e04330864f4a91a898/starlette/types.py#L10-L14. I first tried to change the type to `MutableMapping`, but that produces lot of extra changes as the code is not fully typed and we seem to be using `dict`s everywhere.
- Loading branch information