diff --git a/src/packaged/__init__.py b/src/packaged/__init__.py index 9d41ad4..42e12d4 100644 --- a/src/packaged/__init__.py +++ b/src/packaged/__init__.py @@ -7,11 +7,15 @@ import subprocess import sys import tempfile +from typing import cast, TYPE_CHECKING from unittest import mock import yen.github from yaspin import yaspin +if TYPE_CHECKING: + from yaspin.core import Yaspin + MAKESELF_PATH = os.path.join(os.path.dirname(__file__), "makeself.sh") DEFAULT_PYTHON_VERSION = "3.12" PACKAGED_PYTHON_FOLDER_NAME = ".packaged_python" @@ -73,7 +77,7 @@ def create_package( # Run the build command in the source directory, while making sure # that `python` and related binaries point to the installed python if quiet: - spinner = mock.Mock() + spinner = cast("Yaspin", mock.Mock()) else: spinner = yaspin(text="Running the build command...")