| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
* add constants for `max_connections` * expand docstring for `secret_token`
* add limits for heading * add minimum proximity_alert_radius (as it is non-zero) * fix docstrings that link to HEADING constant twice instead of PROXIMITY_ALERT_RADIUS (and hence 360 was displayed instead of 100000)
|
This is not part of the code I'm changing, but I was just creating a class with limits for ReplyKeyboardMarkup and noticed this. I don't think that InlineKeyboardMarkupLimit here has actually something to do with limits for any params in Bot.send_message, contrary to what's stated in the docstring. |
Sorry, something went wrong.
BTW, class InlineKeyboardMarkupLimit in constants.py doesn't seem to be used anywhere, not even in InlineKeyboardMarkup docstring. |
Sorry, something went wrong.
* add links to/from `InlineQueryResultLocation` and `InputLocationMessageContent` that were not added in previous commits * note that `Location` class does not have limits specified for `live_period` and `proximity_alert_radius` but `InlineQueryResultLocation` and `InputLocationMessageContent` do
There was a problem hiding this comment.
I remember that adding class constants to Bot is not optimal, but shouldn't I fully implement the approach laid out in description for #3107 in Dice? Which would mean introducing class constants for emoji and value in Dice class directly and linking them to constants.py.
Sorry, something went wrong.
+ make sure the order of constants is kept in docs
There was a problem hiding this comment.
you're being thorough, nice! :)
Sorry, something went wrong.
note that this approach leads to similar constants in multiple classes
Typo: "Minimum" instead of "Maximum"
reverting changes made to telegram.dice.rst in cbe20e6
|
Do you think I should also replace "emoji literals" in filters.py with links to constants? |
Sorry, something went wrong.
these are allowed lengths of strings, not allowed values
use existing class `BotCommandLimit`
minimum length is only specified in 1 class and 1 method
|
Saving comments by @Bibo-Joshi here: I vote to keep ChatIniviteLinkLimit separate from a potential ChatLimit enum, since ChatIniviteLinkLimit addresses limits of the ChatInviteLink class rather than generic chat-related limits. Putting title limits into a ChatLimit enum is okay IMO. I also vote to keep the current Chat* enums separate from a ChatLimit enum:
|
Sorry, something went wrong.
* InlineQueryResultContact* InputContactMessageContent
| @@ -93,3 +106,45 @@ def __init__(self, value: int, emoji: str, *, api_kwargs: JSONDict = None): | |||
| """ | |||
There was a problem hiding this comment.
This comment is about the lines above this one. I didn't add any .. versionadded to class constants that I didn't create, though I think this needs to be done. I also think that the version marking in the line immediately above this one (for BOWLING) might be wrong: a bowling emoji was added in 13.4, but the constant itself is being introduced in 20.0. So maybe all constants referring to DiceEmoji should also get the 20.0 marking.
(Since I wasn't changing those lines, I couldn't add a comment to them directly)
Sorry, something went wrong.
There was a problem hiding this comment.
This PR is very high effort and simply insane. It was excruciating for me to just review over the past few days! Well done!
Sorry, something went wrong.
# Conflicts: # telegram/_bot.py # telegram/constants.py
| Back | FazBrowse Home | New Git URL |
Addresses #3107. This PR replaces #3336 that was a PR from my own fork. Instead, now it's a PR within the repository.