From 69dbfd98683c4e80c780be325c02e48c4c4516d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0ar=C5=ABnas=20Nejus?= Date: Wed, 30 Oct 2024 12:13:30 +0000 Subject: [PATCH] Fix lints These seem to have managed to escape the CI checks since the previously merged PR was based on master commit which did not include the checks. --- beetsplug/convert.py | 4 +++- test/plugins/test_convert.py | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/beetsplug/convert.py b/beetsplug/convert.py index bb06488f9..536acf16e 100644 --- a/beetsplug/convert.py +++ b/beetsplug/convert.py @@ -84,6 +84,7 @@ def get_format(fmt=None): return (command.encode("utf-8"), extension.encode("utf-8")) + def in_no_convert(item: Item) -> bool: no_convert_query = config["convert"]["no_convert"].as_str() @@ -92,7 +93,8 @@ def in_no_convert(item: Item) -> bool: return query.match(item) else: return False - + + def should_transcode(item, fmt): """Determine whether the item should be transcoded as part of conversion (i.e., its bitrate is high or it has the wrong format). diff --git a/test/plugins/test_convert.py b/test/plugins/test_convert.py index 9057b2472..e43970dda 100644 --- a/test/plugins/test_convert.py +++ b/test/plugins/test_convert.py @@ -18,12 +18,11 @@ import os.path import re import sys import unittest -import pytest +import pytest from mediafile import MediaFile from beets import util -from beetsplug import convert from beets.library import Item from beets.test import _common from beets.test.helper import ( @@ -34,6 +33,7 @@ from beets.test.helper import ( control_stdin, ) from beets.util import bytestring_path, displayable_path +from beetsplug import convert def shell_quote(text): @@ -352,7 +352,6 @@ class TestNoConvert: ("bitrate:320 , format:ogg", True), ], ) - def test_no_convert_skip(self, config_value, should_skip): item = Item(format="ogg", bitrate=256) convert.config["convert"]["no_convert"] = config_value