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.
|
disable_notification: DVInput[bool] = DEFAULT_NONE, |
and
|
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.
There are certain parameters in our bot methods which optional with the default as
DEFAULT_NONE(as specified by theDefaultsclass). The type hinting of such parameters is not consistent. For e.g.python-telegram-bot/telegram/_bot.py
Line 7197 in 8cc55c3
and
python-telegram-bot/telegram/_bot.py
Line 7201 in 8cc55c3
both parameters accept
bool, but one of them is type hinted to also acceptNone(ODV -> Optional DefaultValue). Here the type hint forprotect_contentshould be corrected toDVInputimo.We should look for other cases like this, and correct it in both the type hints and documentation.