File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -190,12 +190,17 @@ def __init__(
190
190
191
191
@property
192
192
def req (self ) -> Optional [Requirement ]:
193
- """Calculate a requirement from the cached dist if necessary."""
193
+ """Calculate a requirement from the cached dist, if populated.
194
+
195
+ The cached dist can be populated by either
196
+ ``self.cache_virtual_metadata_only_dist()`` or
197
+ ``self.cache_concrete_dist()`` and can also be retrieved with
198
+ ``self.get_dist()``."""
194
199
if self ._req is not None :
195
200
return self ._req
196
- if self ._cached_dist is not None :
197
- name = self ._cached_dist .canonical_name
198
- version = str (self ._cached_dist .version )
201
+ if self ._dist is not None :
202
+ name = self ._dist .canonical_name
203
+ version = str (self ._dist .version )
199
204
self ._req = Requirement (f"{ name } =={ version } " )
200
205
return self ._req
201
206
return None
You can’t perform that action at this time.
0 commit comments