From a32009a79d86085bb188a3afc73724096b348c39 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sat, 13 Oct 2018 10:38:44 +0200 Subject: [PATCH] Don't make use of hardcoded default string values --- pyrogram/client/client.py | 4 ++-- pyrogram/client/ext/base_client.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index ee40d2bc..e3433b3a 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -160,8 +160,8 @@ class Client(Methods, BaseClient): first_name: str = None, last_name: str = None, workers: int = 4, - workdir: str = ".", - config_file: str = "./config.ini"): + workdir: str = BaseClient.WORKDIR, + config_file: str = BaseClient.CONFIG_FILE): super().__init__() self.session_name = session_name diff --git a/pyrogram/client/ext/base_client.py b/pyrogram/client/ext/base_client.py index fa96e1db..e7296236 100644 --- a/pyrogram/client/ext/base_client.py +++ b/pyrogram/client/ext/base_client.py @@ -49,6 +49,8 @@ class BaseClient: UPDATES_WORKERS = 1 DOWNLOAD_WORKERS = 1 OFFLINE_SLEEP = 300 + WORKDIR = "." + CONFIG_FILE = "./config.ini" MEDIA_TYPE_ID = { 0: "thumbnail",