Fix for #1677 (#1678)
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.9) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.9) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.9) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.9) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Has been cancelled

* Make `as_markup` return `super().as_markup`

* Add 1677.misc.rst

* Update 1677.misc.rst
This commit is contained in:
Andrew 2025-04-26 16:18:49 +03:00 committed by GitHub
parent 7a9ecdfbd9
commit 482629ac18
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 8 deletions

5
CHANGES/1677.misc.rst Normal file
View file

@ -0,0 +1,5 @@
Fixed MyPy [return-value] error in `InlineKeyboardBuilder().as_markup()`.
`as_markup` method now overloads parent class method and uses `super()`, to call parent's
`as_markup` method.
Also added correct type hint to `as_markup`'s return in `InlineKeyboardBuilder` and
`ReplyKeyboardBuilder` classes.