Skip to content

Conversation

@Bibo-Joshi
Copy link
Member

closes #4372

The implemented signature for ME.concatenate differs from the one proposed in #4372 to allow concanetating several tuples of text & entities at once.

  • Added .. versionadded:: NEXT.VERSION, .. versionchanged:: NEXT.VERSION, .. deprecated:: NEXT.VERSION or .. versionremoved:: NEXT.VERSION to the docstrings for user facing changes (for methods/class descriptions, arguments and attributes)
  • Created new or adapted existing unit tests
  • Documented code changes according to the CSI standard <https://standards.mousepawmedia.com/en/stable/csi.html>__
  • Added myself alphabetically to AUTHORS.rst (optional)
  • Added new classes & modules to the docs and all suitable __all__ s
  • Checked the Stability Policy <https://docs.python-telegram-bot.org/stability_policy.html>_ in case of deprecations or changes to documented behavior

Copy link
Contributor

@elpekenin elpekenin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of nitpicks, LGTM

Copy link
Member

@harshil21 harshil21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool idea, I like it :)

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't that be clear by the description? : 🤔 it would at least have to be "by parameter by" ...

Copy link
Member

@harshil21 harshil21 Aug 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well yeah, but the description of the parameter just looked a bit too short. I'm fine with keeping as is then

Bibo-Joshi and others added 3 commits August 26, 2024 20:16
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
@Bibo-Joshi Bibo-Joshi merged commit e0f3686 into master Sep 1, 2024
@Bibo-Joshi Bibo-Joshi deleted the me-convenience branch September 1, 2024 07:33
@github-actions github-actions bot locked and limited conversation to collaborators Sep 9, 2024
@Bibo-Joshi Bibo-Joshi added 🔌 enhancement pr description: enhancement and removed enhancement labels Nov 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

🔌 enhancement pr description: enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Convenience Method for MessageEntity Concatenation

4 participants