Skip to content

Commit 4c82baf

Browse files
committed
Remove dead code
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.
1 parent dd1a346 commit 4c82baf

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/pip/_internal/operations/freeze.py

+1-9
Original file line numberDiff line numberDiff line change
@@ -170,15 +170,7 @@ def _get_editable_info(dist: BaseDistribution) -> _EditableInfo:
170170
if not dist.editable:
171171
return _EditableInfo(requirement=None, editable=False, comments=[])
172172
editable_project_location = dist.editable_project_location
173-
if editable_project_location is None:
174-
display = _format_as_name_version(dist)
175-
logger.warning("Editable requirement not found on disk: %s", display)
176-
return _EditableInfo(
177-
requirement=None,
178-
editable=True,
179-
comments=[f"# Editable install not found ({display})"],
180-
)
181-
173+
assert editable_project_location
182174
location = os.path.normcase(os.path.abspath(editable_project_location))
183175

184176
from pip._internal.vcs import RemoteNotFoundError, RemoteNotValidError, vcs

0 commit comments

Comments
 (0)