Skip to content

Add different shortcut methods for Text.as_kwargs()#1657

Merged
JrooTJunior merged 3 commits intoaiogram:dev-3.xfrom
antos07:additional-text-as-kwargs-methods
Apr 2, 2025
Merged

Add different shortcut methods for Text.as_kwargs()#1657
JrooTJunior merged 3 commits intoaiogram:dev-3.xfrom
antos07:additional-text-as-kwargs-methods

Conversation

@antos07
Copy link
Contributor

@antos07 antos07 commented Mar 23, 2025

New methods for aiogram.utils.formatting.Text:

  • as_caption_kwargs()
  • as_poll_question_kwargs()
  • as_poll_explanation_kwargs()
  • as_gift_text_kwargs()

Fixes #1656

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

New methods:
- as_caption_kwargs()
- as_poll_question_kwargs()
- as_poll_explanation_kwargs()
- as_gift_text_kwargs()
@github-actions github-actions bot added the 3.x Issue or PR for stable 3.x version label Mar 23, 2025
@github-actions
Copy link

github-actions bot commented Mar 23, 2025

✔️ Changelog found.

Thank you for adding a description of the changes

@codecov
Copy link

codecov bot commented Mar 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (78748d3) to head (e89313f).
Report is 2 commits behind head on dev-3.x.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           dev-3.x     #1657   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          511       511           
  Lines        12531     12539    +8     
=========================================
+ Hits         12531     12539    +8     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
aiogram/utils/formatting.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JrooTJunior JrooTJunior merged commit 5547963 into aiogram:dev-3.x Apr 2, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.x Issue or PR for stable 3.x version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add as_caption_kwargs() method to aiogram.utils.formatting.Text

2 participants