From 13c9a410503c757fb821c7f042a4f23f46eb7e81 Mon Sep 17 00:00:00 2001 From: Jesse Bannon Date: Mon, 20 Feb 2023 10:09:12 -0800 Subject: [PATCH] lint --- src/ytdl_sub/entries/base_entry.py | 43 +++++++++++++++--------------- tests/expected_download.py | 3 ++- tests/expected_transaction_log.py | 3 ++- tests/unit/utils/test_fixtures.py | 2 +- 4 files changed, 27 insertions(+), 24 deletions(-) diff --git a/src/ytdl_sub/entries/base_entry.py b/src/ytdl_sub/entries/base_entry.py index 67d4af07..37cf6cac 100644 --- a/src/ytdl_sub/entries/base_entry.py +++ b/src/ytdl_sub/entries/base_entry.py @@ -25,33 +25,34 @@ from ytdl_sub.entries.variables.kwargs import WEBPAGE_URL def _sanitize_plex(string: str) -> str: - out = '' + out = "" for char in string: match char: - case '0': - out += '0' - case '1': - out += '1' - case '2': - out += '2' - case '3': - out += '3' - case '4': - out += '4' - case '5': - out += '5' - case '6': - out += '6' - case '7': - out += '7' - case '8': - out += '8' - case '9': - out += '9' + case "0": + out += "0" + case "1": + out += "1" + case "2": + out += "2" + case "3": + out += "3" + case "4": + out += "4" + case "5": + out += "5" + case "6": + out += "6" + case "7": + out += "7" + case "8": + out += "8" + case "9": + out += "9" case _: out += char return out + class BaseEntryVariables: """ Source variables are ``{variables}`` that contain metadata from downloaded media. diff --git a/tests/expected_download.py b/tests/expected_download.py index 11d1fa31..c2faacbf 100644 --- a/tests/expected_download.py +++ b/tests/expected_download.py @@ -5,7 +5,8 @@ from pathlib import Path from typing import List from typing import Optional -from resources import RESOURCE_PATH, REGENERATE_FIXTURES +from resources import REGENERATE_FIXTURES +from resources import RESOURCE_PATH from ytdl_sub.utils.file_handler import get_file_md5_hash diff --git a/tests/expected_transaction_log.py b/tests/expected_transaction_log.py index 5a42e1cb..55e081d3 100644 --- a/tests/expected_transaction_log.py +++ b/tests/expected_transaction_log.py @@ -1,7 +1,8 @@ import os from typing import List -from resources import RESOURCE_PATH, REGENERATE_FIXTURES +from resources import REGENERATE_FIXTURES +from resources import RESOURCE_PATH from ytdl_sub.utils.file_handler import FileHandlerTransactionLog diff --git a/tests/unit/utils/test_fixtures.py b/tests/unit/utils/test_fixtures.py index 471bba8a..a1375149 100644 --- a/tests/unit/utils/test_fixtures.py +++ b/tests/unit/utils/test_fixtures.py @@ -3,4 +3,4 @@ from resources import REGENERATE_FIXTURES def test_regenerate_fixtures_is_false() -> None: """Make sure this is always set to False when committing""" - assert not REGENERATE_FIXTURES \ No newline at end of file + assert not REGENERATE_FIXTURES