Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Type-hinting for IDEs #1373

Closed
Labels
@TiiFuchs

Description

@TiiFuchs

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:
message-type-hint

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.
update-type-hint

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp