diff --git a/test/plugins/test_replace.py b/test/plugins/test_replace.py index 0df6fc903..fb4d5952f 100644 --- a/test/plugins/test_replace.py +++ b/test/plugins/test_replace.py @@ -1,19 +1,26 @@ +from __future__ import annotations + import optparse import shutil -from collections.abc import Generator from pathlib import Path +from typing import TYPE_CHECKING from unittest.mock import Mock import pytest from mediafile import MediaFile from beets import ui -from beets.library import Item, Library +from beets.library import Item from beets.library.exceptions import WriteError from beets.test import _common from beets.test.helper import TestHelper, capture_log from beetsplug.replace import ReplacePlugin +if TYPE_CHECKING: + from collections.abc import Generator + + from beets.library import Library + replace = ReplacePlugin()