Skip to content

Commit

Permalink
fully clear progress output in jupyter notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
ibraheemdev committed May 28, 2024
1 parent 90d1c5c commit 93ca4b9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/uv/src/commands/reporters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ impl uv_installer::DownloadReporter for DownloadReporter {
}

fn on_complete(&self) {
// Need an extra call to `set_message` here to fully clear avoid leaving ghost output
// in Jupyter notebooks.
self.reporter.root.set_message("");
self.reporter.root.finish_and_clear();
}

Expand Down Expand Up @@ -340,6 +343,7 @@ impl uv_resolver::ResolverReporter for ResolverReporter {
}

fn on_complete(&self) {
self.reporter.root.set_message("");
self.reporter.root.finish_and_clear();
}

Expand Down Expand Up @@ -433,6 +437,7 @@ impl uv_installer::InstallReporter for InstallReporter {
}

fn on_install_complete(&self) {
self.progress.set_message("");
self.progress.finish_and_clear();
}
}
Expand Down

0 comments on commit 93ca4b9

Please sign in to comment.