From f6bec91d770767e94f4bf95e62e3fdcec54ae6e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= Date: Sun, 9 Jun 2024 20:42:52 +0000 Subject: [PATCH] Fix minor Pylint warnings. --- full_offline_backup_for_todoist/frontend.py | 4 ++-- tests/test_backup_attachments_downloader.py | 3 ++- tests/test_url_downloader.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/full_offline_backup_for_todoist/frontend.py b/full_offline_backup_for_todoist/frontend.py index f622da6..aa7ce41 100644 --- a/full_offline_backup_for_todoist/frontend.py +++ b/full_offline_backup_for_todoist/frontend.py @@ -91,8 +91,8 @@ def get_credential(opt_file: Optional[str], opt_direct: Optional[str], if deprecated_env in environment: print(f"WARNING: The {deprecated_env} environment variable is no longer necessary") - token = get_credential(args.token_file, args.token, "TODOIST_TOKEN", - "Todoist token (from https://todoist.com/app/settings/integrations/developer)") + token = get_credential(args.token_file, args.token, "TODOIST_TOKEN", "Todoist token" + + "(from https://todoist.com/app/settings/integrations/developer)") return TodoistAuth(token) def handle_download(self, args: argparse.Namespace, environment: Mapping[str, str]) -> None: diff --git a/tests/test_backup_attachments_downloader.py b/tests/test_backup_attachments_downloader.py index 2505669..62aed27 100644 --- a/tests/test_backup_attachments_downloader.py +++ b/tests/test_backup_attachments_downloader.py @@ -6,7 +6,8 @@ import io import csv import json -from full_offline_backup_for_todoist.backup_attachments_downloader import TodoistBackupAttachmentsDownloader +from full_offline_backup_for_todoist.backup_attachments_downloader import ( + TodoistBackupAttachmentsDownloader) from full_offline_backup_for_todoist.tracer import NullTracer from .test_util_memory_vfs import InMemoryVfs diff --git a/tests/test_url_downloader.py b/tests/test_url_downloader.py index 3690dec..601399d 100644 --- a/tests/test_url_downloader.py +++ b/tests/test_url_downloader.py @@ -4,9 +4,9 @@ import unittest import time from unittest.mock import patch -from .test_util_static_http_request_handler import TestStaticHTTPServer from full_offline_backup_for_todoist.url_downloader import URLLibURLDownloader from full_offline_backup_for_todoist.tracer import NullTracer +from .test_util_static_http_request_handler import TestStaticHTTPServer @patch.object(time, 'sleep', lambda secs: None) # For faster tests class TestFrontend(unittest.TestCase):