You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As written, this is actually the return type for the __call__ function (the function returned by command). I believe the actual return type annotation for this method should be
Hi @chrisbouchard, thanks for taking the time to report this issue! And you are right that those type hints are not correct. We'll fix this issue in the next release.
seratch
added a commit
to seratch/bolt-python
that referenced
this issue
Sep 7, 2021
Methods on
App
that are intended to be used as decorators have an incorrect return type annotation. E.g., forApp.command
,As written, this is actually the return type for the
__call__
function (the function returned bycommand
). I believe the actual return type annotation for this method should beI believe this same bug exists for all decorator methods. I've just used
command
as an example because it's the one I was using in my code.Reproducible in:
The
slack_bolt
versionThe
mypy
versionPython runtime version
OS info
(I ran
uname -av
because neither of the commands listened work on Fedora.)Steps to reproduce:
(Share the commands to run, source code, and project settings (e.g., setup.py))
App
instance calledapp
.mypy
on the code.Expected result:
mypy
returns no type errors.Actual result:
mypy
returns an error for the line registering the listener function.Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
The text was updated successfully, but these errors were encountered: