Add MessageEntity.shift_entities and MessageEntity.concatenate#4376
Merged
Bibo-Joshi merged 9 commits intomasterfrom Sep 1, 2024
Merged
Add MessageEntity.shift_entities and MessageEntity.concatenate#4376Bibo-Joshi merged 9 commits intomasterfrom
MessageEntity.shift_entities and MessageEntity.concatenate#4376Bibo-Joshi merged 9 commits intomasterfrom
Conversation
elpekenin
approved these changes
Jul 13, 2024
Contributor
elpekenin
left a comment
There was a problem hiding this comment.
Just a couple of nitpicks, LGTM
harshil21
reviewed
Aug 24, 2024
| by (Union[:obj:`str`, :obj:`int`]): Either the amount to shift the offset by or | ||
| a string whose length will be used as the amount to shift the offset by. In this | ||
| case, UTF-16 encoding will be used to calculate the length. | ||
| entities (Sequence[:class:`telegram.MessageEntity`]): Sequence of entities |
Member
There was a problem hiding this comment.
Suggested change
| entities (Sequence[:class:`telegram.MessageEntity`]): Sequence of entities | |
| entities (Sequence[:class:`telegram.MessageEntity`]): Sequence of entities whose :paramref:`~telegram.MessageEntity.offset` will be shifted :param:`by`. |
Member
Author
There was a problem hiding this comment.
Shouldn't that be clear by the description? : 🤔 it would at least have to be "by parameter by" ...
Member
There was a problem hiding this comment.
well yeah, but the description of the parameter just looked a bit too short. I'm fine with keeping as is then
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
harshil21
approved these changes
Aug 30, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #4372
The implemented signature for
ME.concatenatediffers from the one proposed in #4372 to allow concanetating several tuples of text & entities at once... versionadded:: NEXT.VERSION,.. versionchanged:: NEXT.VERSION,.. deprecated:: NEXT.VERSIONor.. versionremoved:: NEXT.VERSIONto the docstrings for user facing changes (for methods/class descriptions, arguments and attributes)CSI standard <https://standards.mousepawmedia.com/en/stable/csi.html>__Added myself alphabetically toAUTHORS.rst(optional)Added new classes & modules to the docs and all suitable__all__sStability Policy <https://docs.python-telegram-bot.org/stability_policy.html>_ in case of deprecations or changes to documented behavior