File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 23
23
DIRECT_URL_METADATA_NAME ,
24
24
DirectUrl ,
25
25
DirectUrlValidationError ,
26
- DirInfo ,
27
26
)
28
27
from pip ._internal .utils .compat import stdlib_pkgs # TODO: Move definition here.
29
28
from pip ._internal .utils .egg_link import egg_link_path_from_sys_path
@@ -86,7 +85,7 @@ def editable_project_location(self) -> Optional[str]:
86
85
# TODO: this property is relatively costly to compute, memoize it ?
87
86
direct_url = self .direct_url
88
87
if direct_url :
89
- if isinstance ( direct_url .info , DirInfo ) and direct_url . info . editable :
88
+ if direct_url .is_local_editable () :
90
89
return url_to_path (direct_url .url )
91
90
else :
92
91
# Search for an .egg-link file by walking sys.path, as it was
Original file line number Diff line number Diff line change @@ -215,3 +215,6 @@ def from_json(cls, s: str) -> "DirectUrl":
215
215
216
216
def to_json (self ) -> str :
217
217
return json .dumps (self .to_dict (), sort_keys = True )
218
+
219
+ def is_local_editable (self ) -> bool :
220
+ return isinstance (self .info , DirInfo ) and self .info .editable
You can’t perform that action at this time.
0 commit comments