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 @@ -192,12 +192,17 @@ def __init__(
192192
193193 @property
194194 def req (self ) -> Optional [Requirement ]:
195- """Calculate a requirement from the cached dist if necessary."""
195+ """Calculate a requirement from the cached dist, if populated.
196+
197+ The cached dist can be populated by either
198+ ``self.cache_virtual_metadata_only_dist()`` or
199+ ``self.cache_concrete_dist()`` and can also be retrieved with
200+ ``self.get_dist()``."""
196201 if self ._req is not None :
197202 return self ._req
198- if self ._cached_dist is not None :
199- name = self ._cached_dist .canonical_name
200- version = str (self ._cached_dist .version )
203+ if self ._dist is not None :
204+ name = self ._dist .canonical_name
205+ version = str (self ._dist .version )
201206 self ._req = Requirement (f"{ name } =={ version } " )
202207 return self ._req
203208 return None
You can’t perform that action at this time.
0 commit comments