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:
monosans 2025-01-19 01:35:44 +00:00 committed by GitHub
parent bbdc43b737
commit 6e81294685
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

1
CHANGES/1628.bugfix.rst Normal file
View 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

View file

@ -2,4 +2,5 @@ from typing import Protocol
class Downloadable(Protocol):
file_id: str
@property
def file_id(self) -> str: ...