mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-05 23:34:42 +00:00
fix: change the Downloadable protocol to be non-writable to shut up type checking that checks code that uses the bot.download(...) method (#1628)
* fix: don't require Downloadable.file_id to be writable * docs: add changelog * Update CHANGES/1628.bugfix.rst Co-authored-by: Alex Root Junior <jroot.junior@gmail.com> --------- Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
This commit is contained in:
parent
bbdc43b737
commit
6e81294685
2 changed files with 3 additions and 1 deletions
1
CHANGES/1628.bugfix.rst
Normal file
1
CHANGES/1628.bugfix.rst
Normal file
|
|
@ -0,0 +1 @@
|
|||
Change the :code:`Downloadable` protocol to be non-writable to shut up type checking that checks code that uses the :code:`bot.download(...)` method
|
||||
|
|
@ -2,4 +2,5 @@ from typing import Protocol
|
|||
|
||||
|
||||
class Downloadable(Protocol):
|
||||
file_id: str
|
||||
@property
|
||||
def file_id(self) -> str: ...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue