Implement uv tree (#4708)

## Summary

Implements the `uv tree`, which displays dependencies from the lockfile
as a tree. Resolves https://github.com/astral-sh/uv/issues/4699.
This commit is contained in:
Ibraheem Ahmed 2024-07-08 14:07:48 -04:00 committed by GitHub
parent 4bc36c0cb8
commit dc7ad3abdb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 434 additions and 101 deletions

View file

@ -324,6 +324,11 @@ impl Lock {
&self.distributions
}
/// Returns the owned [`Distribution`] entries in this lock.
pub fn into_distributions(self) -> Vec<Distribution> {
self.distributions
}
/// Returns the supported Python version range for the lockfile, if present.
pub fn requires_python(&self) -> Option<&RequiresPython> {
self.requires_python.as_ref()