Add basic jupyter notebook support (#3440)

* Add basic jupyter notebook support behind a feature flag

* Address review comments

* Rename in separate commit to make both git and clippy happy

* cfg(feature = "jupyter_notebook") another test

* Address more review comments

* Address more review comments

* and clippy and windows

* More review comment
This commit is contained in:
konstin 2023-03-20 12:06:01 +01:00 committed by GitHub
parent a45753f462
commit 81d0884974
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 1035 additions and 68 deletions

View file

@ -1,7 +1,7 @@
use anyhow::Result;
use clap::CommandFactory;
use notify::{recommended_watcher, RecursiveMode, Watcher};
use std::io;
use std::io::{self, BufWriter};
use std::path::PathBuf;
use std::process::ExitCode;
use std::sync::mpsc::channel;
@ -262,7 +262,8 @@ fn check(args: CheckArgs, log_level: LogLevel) -> Result<ExitStatus> {
if cli.statistics {
printer.write_statistics(&diagnostics)?;
} else {
printer.write_once(&diagnostics)?;
let mut stdout = BufWriter::new(io::stdout().lock());
printer.write_once(&diagnostics, &mut stdout)?;
}
}