-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
⚙️ documentationaffected functionality: documentationaffected functionality: documentation⚙️ type-hintingaffected functionality: type-hintingaffected functionality: type-hinting
Milestone
Description
There are certain parameters in our bot methods which optional with the default as DEFAULT_NONE (as specified by the Defaults class). The type hinting of such parameters is not consistent. For e.g.
python-telegram-bot/telegram/_bot.py
Line 7197 in 8cc55c3
| disable_notification: DVInput[bool] = DEFAULT_NONE, |
and
python-telegram-bot/telegram/_bot.py
Line 7201 in 8cc55c3
| protect_content: ODVInput[bool] = DEFAULT_NONE, |
both parameters accept bool, but one of them is type hinted to also accept None (ODV -> Optional DefaultValue). Here the type hint for protect_content should be corrected to DVInput imo.
We should look for other cases like this, and correct it in both the type hints and documentation.
Metadata
Metadata
Assignees
Labels
⚙️ documentationaffected functionality: documentationaffected functionality: documentation⚙️ type-hintingaffected functionality: type-hintingaffected functionality: type-hinting