From 9649b1457cc3be512a63b70664620c1180098af8 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sat, 13 Oct 2018 10:41:58 +0200 Subject: [PATCH] Don't make use of hardcoded default int values too --- pyrogram/client/client.py | 2 +- pyrogram/client/ext/base_client.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index e3433b3a..c607207f 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -159,7 +159,7 @@ class Client(Methods, BaseClient): force_sms: bool = False, first_name: str = None, last_name: str = None, - workers: int = 4, + workers: int = BaseClient.WORKERS, workdir: str = BaseClient.WORKDIR, config_file: str = BaseClient.CONFIG_FILE): super().__init__() diff --git a/pyrogram/client/ext/base_client.py b/pyrogram/client/ext/base_client.py index e7296236..c18c4050 100644 --- a/pyrogram/client/ext/base_client.py +++ b/pyrogram/client/ext/base_client.py @@ -49,6 +49,7 @@ class BaseClient: UPDATES_WORKERS = 1 DOWNLOAD_WORKERS = 1 OFFLINE_SLEEP = 300 + WORKERS = 4 WORKDIR = "." CONFIG_FILE = "./config.ini"