Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

AddMessageEntity.shift_entities andMessageEntity.concatenate#4376

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Bibo-Joshi merged 9 commits intomasterfromme-convenience
Sep 1, 2024

Conversation

Bibo-Joshi
Copy link
Member

closes#4372

The implemented signature forME.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 theCSI 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__ s
  • Checked theStability Policy <https://docs.python-telegram-bot.org/stability_policy.html>_ in case of deprecations or changes to documented behavior

Copy link
Contributor

@elpekeninelpekenin 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

@harshil21harshil21 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`]):Sequenceofentities
entities (Sequence[:class:`telegram.MessageEntity`]):Sequenceofentitieswhose :paramref:`~telegram.MessageEntity.offset`willbeshifted :param:`by`.

Copy link
MemberAuthor

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

@harshil21harshil21Aug 26, 2024
edited
Loading

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-Joshiand others added3 commitsAugust 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-JoshiBibo-Joshi merged commite0f3686 intomasterSep 1, 2024
26 of 27 checks passed
@Bibo-JoshiBibo-Joshi deleted the me-convenience branchSeptember 1, 2024 07:33
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsSep 9, 2024
@Bibo-JoshiBibo-Joshi added 🔌 enhancementpr description: enhancement and removed enhancement labelsNov 3, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@harshil21harshil21harshil21 approved these changes

@elpekeninelpekeninelpekenin approved these changes

Assignees
No one assigned
Labels
🔌 enhancementpr description: enhancement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

[FEATURE] Convenience Method forMessageEntity Concatenation
3 participants
@Bibo-Joshi@harshil21@elpekenin

[8]ページ先頭

©2009-2025 Movatter.jp