From c2f0f3affc1e77aceccbeaf267c3641db837742c Mon Sep 17 00:00:00 2001 From: Labrys of Knossos Date: Wed, 26 Dec 2018 11:38:01 -0500 Subject: [PATCH] Fix PEP8 variable and argument names should be snake_case --- libs/custom/synchronousdeluge/client.py | 10 +++++----- libs/custom/utorrent/upload.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libs/custom/synchronousdeluge/client.py b/libs/custom/synchronousdeluge/client.py index 3c07f572..aa180bf7 100644 --- a/libs/custom/synchronousdeluge/client.py +++ b/libs/custom/synchronousdeluge/client.py @@ -26,18 +26,18 @@ class DelugeClient(object): def _get_local_auth(self): username = password = "" if platform.system() in ('Windows', 'Microsoft'): - appDataPath = os.environ.get("APPDATA") - if not appDataPath: + app_data_path = os.environ.get("APPDATA") + if not app_data_path: from six.moves import winreg hkey = winreg.OpenKey( winreg.HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", ) - appDataReg = winreg.QueryValueEx(hkey, "AppData") - appDataPath = appDataReg[0] + app_data_reg = winreg.QueryValueEx(hkey, "AppData") + app_data_path = app_data_reg[0] winreg.CloseKey(hkey) - auth_file = os.path.join(appDataPath, "deluge", "auth") + auth_file = os.path.join(app_data_path, "deluge", "auth") else: from xdg.BaseDirectory import save_config_path try: diff --git a/libs/custom/utorrent/upload.py b/libs/custom/utorrent/upload.py index faa21591..03d58bcc 100644 --- a/libs/custom/utorrent/upload.py +++ b/libs/custom/utorrent/upload.py @@ -23,9 +23,9 @@ class MultiPartForm(object): self.form_fields.append((name, value)) return - def add_file(self, fieldname, filename, fileHandle, mimetype=None): + def add_file(self, fieldname, filename, file_handle, mimetype=None): """Add a file to be uploaded.""" - body = fileHandle.read() + body = file_handle.read() if mimetype is None: mimetype = mimetypes.guess_type(filename)[0] or 'application/octet-stream' self.files.append((fieldname, filename, mimetype, body))