Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
I have tried to remove the .egg-link
(in which case the package is not considered editable),
and removing the package while leaving the .egg-link
(in which case the package is not shown).
I could not produce this "Editable install not found" message
with pip 21.2.

So I think this is dead code and I'm replacing this test by an assert.
  • Loading branch information
sbidoul committed Aug 28, 2021
1 parent 2914d79 commit 699b432
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/pip/_internal/operations/freeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,7 @@ def _get_editable_info(dist: BaseDistribution) -> _EditableInfo:
if not dist.editable:
return _EditableInfo(requirement=None, editable=False, comments=[])
editable_project_location = dist.editable_project_location
if editable_project_location is None:
display = _format_as_name_version(dist)
logger.warning("Editable requirement not found on disk: %s", display)
return _EditableInfo(
requirement=None,
editable=True,
comments=[f"# Editable install not found ({display})"],
)

assert editable_project_location
location = os.path.normcase(os.path.abspath(editable_project_location))

from pip._internal.vcs import RemoteNotFoundError, RemoteNotValidError, vcs
Expand Down

0 comments on commit 699b432

Please sign in to comment.