From 9b81d23d9dd839b935fa7bebf363fa75a7e9003d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Sun, 18 Feb 2024 17:29:50 -0800 Subject: [PATCH] Fixes for 0.1.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bernát Gábor --- pyproject.toml | 2 +- src/tox_uv/_installer.py | 4 ++-- src/tox_uv/_venv.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 291f0ad..9e2bce5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dynamic = [ ] dependencies = [ "tox<5,>=4.13", - "uv<1,>=0.1.5", + "uv<1,>=0.1.6", ] optional-dependencies.test = [ "covdefaults>=2.3", diff --git a/src/tox_uv/_installer.py b/src/tox_uv/_installer.py index d64e2cf..a6aca88 100644 --- a/src/tox_uv/_installer.py +++ b/src/tox_uv/_installer.py @@ -14,7 +14,7 @@ from tox.tox_env.python.package import EditableLegacyPackage, EditablePackage, SdistPackage, WheelPackage from tox.tox_env.python.pip.pip_install import Pip from tox.tox_env.python.pip.req_file import PythonDeps -from uv.__main__ import find_uv_bin # noqa: PLC2701 +from uv import find_uv_bin if TYPE_CHECKING: from tox.config.main import Config @@ -32,7 +32,7 @@ def _register_config(self) -> None: @property def uv(self) -> str: - return cast(str, find_uv_bin()) + return find_uv_bin() def default_install_command(self, conf: Config, env_name: str | None) -> Command: # noqa: ARG002 cmd = [self.uv, "pip", "install", "{opts}", "{packages}"] diff --git a/src/tox_uv/_venv.py b/src/tox_uv/_venv.py index e3493ae..2a322b8 100644 --- a/src/tox_uv/_venv.py +++ b/src/tox_uv/_venv.py @@ -11,7 +11,7 @@ from tox.execute.local_sub_process import LocalSubProcessExecutor from tox.execute.request import StdinSource from tox.tox_env.python.api import Python, PythonInfo, VersionInfo -from uv.__main__ import find_uv_bin # noqa: PLC2701 +from uv import find_uv_bin from virtualenv.discovery.py_spec import PythonSpec from ._installer import UvInstaller @@ -91,7 +91,7 @@ def _get_python(self, base_python: list[str]) -> PythonInfo | None: # noqa: PLR @property def uv(self) -> str: - return cast(str, find_uv_bin()) + return find_uv_bin() @property def venv_dir(self) -> Path: