From 0ffad5d18e28abeb876e9a3cb239f72426916880 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Fri, 27 Apr 2018 15:24:27 +0200 Subject: [PATCH] Cast file_total_parts to int For some reason pycharm is thinking math.ceil() is returning a float --- pyrogram/client/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index 07679545..eed83798 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -2603,7 +2603,7 @@ class Client: progress: callable = None): part_size = 512 * 1024 file_size = os.path.getsize(path) - file_total_parts = math.ceil(file_size / part_size) + 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 file_id = file_id or self.rnd_id()