What kind of feature are you missing? Where do you notice a shortcoming of PTB?
In test_official we currently allow convenience input types only for send_* methods:
|
# 2) HANDLING OTHER TYPES: |
|
# Special case for send_* methods where we accept more types than the official API: |
|
elif ptb_param.name in PTCE.ADDITIONAL_TYPES and obj.__name__.startswith("send"): |
|
log("Checking that `%s` has an additional argument!\n", ptb_param.name) |
|
mapped_type = mapped_type | PTCE.ADDITIONAL_TYPES[ptb_param.name] |
|
ADDITIONAL_TYPES = { |
|
"photo": PhotoSize, |
|
"video": Video, |
|
"video_note": VideoNote, |
|
"audio": Audio, |
|
"document": Document, |
|
"animation": Animation, |
|
"voice": Voice, |
|
"sticker": Sticker, |
|
} |
Removing the obj.__name__.startswith("send") reveals that there are a few more parameters that could use convenience types.
Describe the solution you'd like
- Set up the "additional types" excetpions in test_official such that they can either be defined globally or per method, remove the
obj.__name__ check
- add support for convenience types where possible
Describe alternatives you've considered
No response
Additional context
No response
What kind of feature are you missing? Where do you notice a shortcoming of PTB?
In
test_officialwe currently allow convenience input types only forsend_*methods:python-telegram-bot/tests/test_official/arg_type_checker.py
Lines 174 to 178 in 1511237
python-telegram-bot/tests/test_official/exceptions.py
Lines 39 to 48 in 1511237
Removing the
obj.__name__.startswith("send")reveals that there are a few more parameters that could use convenience types.Describe the solution you'd like
obj.__name__checkDescribe alternatives you've considered
No response
Additional context
No response