Telethon
Telethon copied to clipboard
Argument of type "None" cannot be assigned to parameter "buttons" of type "MarkupLike"
Checklist
- [x] The error is in the library's code, and not in my own.
- [x] I have searched for this issue before posting it and there isn't a duplicate.
- [x] I ran
pip install -U https://github.com/LonamiWebs/Telethon/archive/master.zip
and triggered the bug in the latest version.
I am using pyright for static checking and lining with coc-pyright. But it seems that you miss-typed the buttons
argument in the send_message
and the send_file
methods.
I fixed that by editing the code of this package directly like this:
- buttons: 'hints.MarkupLike' = None,
+ buttons: 'hints.MarkupLike' | None = None,