Skip to content

Commit

Permalink
fix: Use Union[Path, Link] for pip_editable_install, reformat
Browse files Browse the repository at this point in the history
In the future, pip_editable_install really should be removed
  • Loading branch information
serverwentdown committed Nov 12, 2021
1 parent 13785e6 commit 21e46f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion poetry/installation/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,9 @@ def _download_link(self, operation: Union[Install, Update], link: Link) -> Link:
archive = self._chef.prepare(archive)

if package.files:
archive_path = url_to_path(archive.url) if isinstance(archive, Link) else archive
archive_path = (
url_to_path(archive.url) if isinstance(archive, Link) else archive
)
archive_hash = (
"sha256:"
+ FileDependency(
Expand Down
4 changes: 3 additions & 1 deletion poetry/utils/pip.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ def pip_install(
raise PoetryException(f"Failed to install {path.as_posix()}") from e


def pip_editable_install(directory: Path, environment: Env) -> Union[int, str]:
def pip_editable_install(
directory: Union[Path, Link], environment: Env
) -> Union[int, str]:
return pip_install(
path=directory, environment=environment, editable=True, deps=False, upgrade=True
)

0 comments on commit 21e46f1

Please sign in to comment.