botbuilder-python
botbuilder-python copied to clipboard
Typing for Middleware is incorrect
Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.
Version
4.16.2
Describe the bug
The typing for the middleware on_turn handler is:
https://github.com/microsoft/botbuilder-python/blob/a7f5d91398bf502128645ec5d698024c5aaeda3c/libraries/botbuilder-core/botbuilder/core/middleware_set.py#L27
Notice the arguments is a TurnContext?
However, it's called like: https://github.com/microsoft/botbuilder-python/blob/a7f5d91398bf502128645ec5d698024c5aaeda3c/libraries/botbuilder-core/botbuilder/core/middleware_set.py#L83-L89.
Here call_next_middleware takes no arguments.
This results in:
TypeError: MiddlewareSet.receive_activity_internal.<locals>.call_next_middleware() takes 0 positional arguments but 1 was given