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.
This commit is contained in:
Šarūnas Nejus 2024-10-30 12:13:30 +00:00
parent 826783d4c3
commit 69dbfd9868
No known key found for this signature in database
GPG key ID: DD28F6704DBE3435
2 changed files with 5 additions and 4 deletions

View file

@ -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).

View file

@ -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