- Notifications
You must be signed in to change notification settings - Fork5.7k
Description
Hi there,
I like to use the Message.reply_* functions but it's kind of annoying to always look up the parameters manually. There is a lack of type-hinting here. And with python stub files (or type hinting in the python files directly this would not be a problem at all.
The Problem is, if I have a update instance and I callupdate.message
it doesn't know that this is a Message instance. If I tell my IDE usingmessage = update.message # type: Message
it works so far. But when I then typemessage.reply_text(
there is no type-hinting (or variable hinting for that matter) for the named parameters. This is annoying.
I started to create python stub files like this:
But it would be awesome if type-hinting a laPEP-484 would be integrated in the project itself.
I know that python 2 compatibility (at least until EOL) is still a thing, but type-hinting with comments like described above (and at some place in PEP-484) is always possible for both python versions.