From 914dfca5749375ca2c6fe3c040e2b33aac6219b9 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Tue, 18 Dec 2018 09:50:39 +0100 Subject: [PATCH] Reformat code and optimize imports --- pyrogram/client/client.py | 6 +++--- pyrogram/client/methods/chats/get_chat_member.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index bd132851..7003823d 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -1135,13 +1135,13 @@ class Client(Methods, BaseClient): progress_args: tuple = ()): part_size = 512 * 1024 file_size = os.path.getsize(path) - + if file_size == 0: raise ValueError("File size equals to 0 B") - + if file_size > 1500 * 1024 * 1024: raise ValueError("Telegram doesn't support uploading files bigger than 1500 MiB") - + file_total_parts = int(math.ceil(file_size / part_size)) is_big = True if file_size > 10 * 1024 * 1024 else False is_missing_part = True if file_id is not None else False diff --git a/pyrogram/client/methods/chats/get_chat_member.py b/pyrogram/client/methods/chats/get_chat_member.py index b5e7cec7..b304be17 100644 --- a/pyrogram/client/methods/chats/get_chat_member.py +++ b/pyrogram/client/methods/chats/get_chat_member.py @@ -16,9 +16,9 @@ # You should have received a copy of the GNU Lesser General Public License # along with Pyrogram. If not, see . +import pyrogram from pyrogram.api import functions, types, errors from ...ext import BaseClient -import pyrogram class GetChatMember(BaseClient):