Skip to content

Commit 962eca2

Browse files
Fix the parse_mode attribute type hint of InputMedia
which was still type hinted with a string (instead of an enum). Co-authored-by: Alisson Lauffer <[email protected]>
1 parent db87b43 commit 962eca2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pyrogram/types/input_media/input_media.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@
1616
# You should have received a copy of the GNU Lesser General Public License
1717
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
1818

19-
from typing import List, Union, BinaryIO
19+
from typing import List, Optional, Union, BinaryIO
2020

2121
from ..messages_and_media import MessageEntity
2222
from ..object import Object
23+
from ... import enums
2324

2425

2526
class InputMedia(Object):
@@ -38,7 +39,7 @@ def __init__(
3839
self,
3940
media: Union[str, BinaryIO],
4041
caption: str = "",
41-
parse_mode: str = None,
42+
parse_mode: Optional["enums.ParseMode"] = None,
4243
caption_entities: List[MessageEntity] = None
4344
):
4445
super().__init__()

0 commit comments

Comments
 (0)