-
Notifications
You must be signed in to change notification settings - Fork 6k
Labels
⚙️ type-hintingaffected functionality: type-hintingaffected functionality: type-hinting
Description
Steps to Reproduce
- Use
ApplicationBuilder().http_version("2")to enable http2, as it said in the docs
Expected behaviour
Type-checkers accept literal '2'
Actual behaviour
Type-checker complains that Literal["1.1", "2.0"] was expected.

Operating System
Debian sid
Version of Python, python-telegram-bot & dependencies
python-telegram-bot 20.4
Bot API 6.7
Python 3.11.4 (main, Jun 7 2023, 10:13:09) [GCC 12.2.0]Relevant log output
No response
Additional Context
In telegram._utils.types it defines HTTPVersion = Literal["1.1", "2.0"]. The correct one will be HTTPVersion = Literal["1.1", "2"].
Metadata
Metadata
Assignees
Labels
⚙️ type-hintingaffected functionality: type-hintingaffected functionality: type-hinting