diff --git a/CHANGES/1628.bugfix.rst b/CHANGES/1628.bugfix.rst new file mode 100644 index 00000000..ee5d7299 --- /dev/null +++ b/CHANGES/1628.bugfix.rst @@ -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 diff --git a/aiogram/types/downloadable.py b/aiogram/types/downloadable.py index be808293..080caf64 100644 --- a/aiogram/types/downloadable.py +++ b/aiogram/types/downloadable.py @@ -2,4 +2,5 @@ from typing import Protocol class Downloadable(Protocol): - file_id: str + @property + def file_id(self) -> str: ...