From 88d45b085beefc26861470fad17668a1a64d5161 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Thu, 9 Aug 2018 21:46:14 +0200 Subject: [PATCH] Move InputMedia types in a dedicated folder --- pyrogram/client/types/__init__.py | 11 ++++----- pyrogram/client/types/input_media/__init__.py | 24 +++++++++++++++++++ .../types/{ => input_media}/input_media.py | 0 .../input_media_animation.py | 0 .../{ => input_media}/input_media_audio.py | 0 .../{ => input_media}/input_media_document.py | 0 .../{ => input_media}/input_media_photo.py | 0 .../{ => input_media}/input_media_video.py | 0 .../{ => input_media}/input_phone_contact.py | 0 9 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 pyrogram/client/types/input_media/__init__.py rename pyrogram/client/types/{ => input_media}/input_media.py (100%) rename pyrogram/client/types/{ => input_media}/input_media_animation.py (100%) rename pyrogram/client/types/{ => input_media}/input_media_audio.py (100%) rename pyrogram/client/types/{ => input_media}/input_media_document.py (100%) rename pyrogram/client/types/{ => input_media}/input_media_photo.py (100%) rename pyrogram/client/types/{ => input_media}/input_media_video.py (100%) rename pyrogram/client/types/{ => input_media}/input_phone_contact.py (100%) diff --git a/pyrogram/client/types/__init__.py b/pyrogram/client/types/__init__.py index a07ee27b..46332453 100644 --- a/pyrogram/client/types/__init__.py +++ b/pyrogram/client/types/__init__.py @@ -23,13 +23,10 @@ from .chat_members import ChatMembers from .chat_photo import ChatPhoto from .dialog import Dialog from .dialogs import Dialogs -from .input_media import InputMedia -from .input_media_animation import InputMediaAnimation -from .input_media_audio import InputMediaAudio -from .input_media_document import InputMediaDocument -from .input_media_photo import InputMediaPhoto -from .input_media_video import InputMediaVideo -from .input_phone_contact import InputPhoneContact +from .input_media import ( + InputMediaAudio, InputPhoneContact, InputMediaVideo, InputMediaPhoto, + InputMediaDocument, InputMediaAnimation +) from .media import ( Audio, Contact, Document, Animation, Location, Photo, PhotoSize, Sticker, Venue, Video, VideoNote, Voice, UserProfilePhotos diff --git a/pyrogram/client/types/input_media/__init__.py b/pyrogram/client/types/input_media/__init__.py new file mode 100644 index 00000000..4b3d90a3 --- /dev/null +++ b/pyrogram/client/types/input_media/__init__.py @@ -0,0 +1,24 @@ +# Pyrogram - Telegram MTProto API Client Library for Python +# Copyright (C) 2017-2018 Dan Tès +# +# This file is part of Pyrogram. +# +# Pyrogram is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Pyrogram is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with Pyrogram. If not, see . + +from .input_media_animation import InputMediaAnimation +from .input_media_audio import InputMediaAudio +from .input_media_document import InputMediaDocument +from .input_media_photo import InputMediaPhoto +from .input_media_video import InputMediaVideo +from .input_phone_contact import InputPhoneContact diff --git a/pyrogram/client/types/input_media.py b/pyrogram/client/types/input_media/input_media.py similarity index 100% rename from pyrogram/client/types/input_media.py rename to pyrogram/client/types/input_media/input_media.py diff --git a/pyrogram/client/types/input_media_animation.py b/pyrogram/client/types/input_media/input_media_animation.py similarity index 100% rename from pyrogram/client/types/input_media_animation.py rename to pyrogram/client/types/input_media/input_media_animation.py diff --git a/pyrogram/client/types/input_media_audio.py b/pyrogram/client/types/input_media/input_media_audio.py similarity index 100% rename from pyrogram/client/types/input_media_audio.py rename to pyrogram/client/types/input_media/input_media_audio.py diff --git a/pyrogram/client/types/input_media_document.py b/pyrogram/client/types/input_media/input_media_document.py similarity index 100% rename from pyrogram/client/types/input_media_document.py rename to pyrogram/client/types/input_media/input_media_document.py diff --git a/pyrogram/client/types/input_media_photo.py b/pyrogram/client/types/input_media/input_media_photo.py similarity index 100% rename from pyrogram/client/types/input_media_photo.py rename to pyrogram/client/types/input_media/input_media_photo.py diff --git a/pyrogram/client/types/input_media_video.py b/pyrogram/client/types/input_media/input_media_video.py similarity index 100% rename from pyrogram/client/types/input_media_video.py rename to pyrogram/client/types/input_media/input_media_video.py diff --git a/pyrogram/client/types/input_phone_contact.py b/pyrogram/client/types/input_media/input_phone_contact.py similarity index 100% rename from pyrogram/client/types/input_phone_contact.py rename to pyrogram/client/types/input_media/input_phone_contact.py