Skip to content

Prevent endless loop with buttons#1626

Merged
JrooTJunior merged 4 commits intodev-3.xfrom
bugfix/endless-loop-with-buttons
Feb 16, 2025
Merged

Prevent endless loop with buttons#1626
JrooTJunior merged 4 commits intodev-3.xfrom
bugfix/endless-loop-with-buttons

Conversation

@Olegt0rr
Copy link
Contributor

@Olegt0rr Olegt0rr commented Jan 5, 2025

Description

Since KeyboardBuilder is not restricted to be created directly, we should avoid case with zero max width.

Fixes #1595

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • Operating System:
  • Python version:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@github-actions github-actions bot added the 3.x Issue or PR for stable 3.x version label Jan 5, 2025
@github-actions
Copy link

github-actions bot commented Jan 5, 2025

✔️ Changelog found.

Thank you for adding a description of the changes

@codecov
Copy link

codecov bot commented Jan 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (44bd8fe) to head (0ceba72).
Report is 8 commits behind head on dev-3.x.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           dev-3.x     #1626   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          484       484           
  Lines        12205     12207    +2     
=========================================
+ Hits         12205     12207    +2     
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/keyboard.py 100.00% <100.00%> (ø)

@Olegt0rr Olegt0rr marked this pull request as draft January 5, 2025 10:38
@Olegt0rr Olegt0rr marked this pull request as ready for review January 6, 2025 08:00
@Olegt0rr Olegt0rr requested a review from a team January 6, 2025 08:00
@Olegt0rr Olegt0rr added the bug Something is wrong with the framework label Jan 12, 2025
@JrooTJunior JrooTJunior merged commit e17c841 into dev-3.x Feb 16, 2025
25 checks passed
@Olegt0rr Olegt0rr deleted the bugfix/endless-loop-with-buttons branch February 17, 2025 06:58
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 bug Something is wrong with the framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KeyboardBuilder: if self.max_width = 0, endless while loop

2 participants