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

Appearance settings

Sub-Optiomal type hints in ConversationHandler #3665

Copy link
Copy link
@klim-neumann

Description

@klim-neumann
Issue body actions

Steps to Reproduce

  1. Сreate an instance of the CallbackQueryHandler class
  2. Create an instance of the ConversationHandler class with entry_points that contains the instance from the first step

Expected behaviour

Type checking should pass without errors

Actual behaviour

Type checking throws an error:

Argument of type "list[CallbackQueryHandler[DEFAULT_TYPE]]" cannot be assigned to parameter "entry_points" of type "List[BaseHandler[Update, CCT@ConversationHandler]]"

Operating System

MacOS 12.6.5

Version of Python, python-telegram-bot & dependencies

python-telegram-bot 20.2
Bot API 6.6
Python 3.11.2 (main, Apr 15 2023, 18:09:35) [Clang 14.0.0 (clang-1400.0.29.202)]

Relevant log output

No response

Additional Context

ConversationHandler entry_points should be Sequence[BaseHandler[Update, CCT]] instead of List[BaseHandler[Update, CCT]]?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.