Skip to content

Fix incorrect type checking in KeyboardBuilder #674

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 27, 2021
Merged

Fix incorrect type checking in KeyboardBuilder #674

merged 3 commits into from
Aug 27, 2021

Conversation

WhiteMemory99
Copy link
Contributor

@WhiteMemory99 WhiteMemory99 commented Aug 27, 2021

Description

Now the KeyboardBuilder as_markup method checks if the button type is ReplyKeyboardMarkup, which is incorrect because the button type can be either InlineKeyboardButton or KeyboardButton.

Type of change

  • Documentation (typos, code examples or any documentation update)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

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
  • My changes generate no new warnings
  • 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

Copy link
Member

@JrooTJunior JrooTJunior left a comment

Choose a reason for hiding this comment

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

The changes description file is required.

  1. towncrier create 674.bugfix (optional step)
  2. Write short description to CHANGES/674.bugfix file

@codecov
Copy link

codecov bot commented Aug 27, 2021

Codecov Report

Merging #674 (d3e24b6) into dev-3.x (18a93aa) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           dev-3.x      #674   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          269       269           
  Lines         5658      5658           
=========================================
  Hits          5658      5658           
Flag Coverage Δ
unittests 100.00% <ø> (ø)

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

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
@JrooTJunior JrooTJunior merged commit 7c0e229 into aiogram:dev-3.x Aug 27, 2021
@JrooTJunior JrooTJunior added 3.x Issue or PR for stable 3.x version bug Something is wrong with the framework labels Aug 27, 2021
@JrooTJunior JrooTJunior added this to the 3.0 milestone Aug 27, 2021
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.

2 participants