Skip to content

Commit

Permalink
Help mypy narrow
Browse files Browse the repository at this point in the history
  • Loading branch information
layday authored and gaborbernat committed Mar 10, 2024
1 parent f28f1ad commit 327f280
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/build/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,13 @@ def create(self, path: str) -> None:

self._uv_bin = uv.find_uv_bin()
except (ModuleNotFoundError, FileNotFoundError):
self._uv_bin = shutil.which('uv')
if self._uv_bin is None:
uv_bin = shutil.which('uv')
if uv_bin is None:
msg = 'uv executable not found'
raise RuntimeError(msg) from None

_ctx.log(f'Using external uv from {self._uv_bin}')
_ctx.log(f'Using external uv from {uv_bin}')
self._uv_bin = uv_bin

venv.EnvBuilder(symlinks=_fs_supports_symlink(), with_pip=False).create(self._env_path)
self.python_executable, self.scripts_dir, _ = _find_executable_and_scripts(self._env_path)
Expand Down

0 comments on commit 327f280

Please sign in to comment.