From 6b067c2a0a0d14b47f5d2cb8ae7ce1e1c547fd4f Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Tue, 27 Jun 2023 12:14:59 -0400 Subject: [PATCH] Enable --watch for Jupyter notebooks --- crates/ruff_cli/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ruff_cli/src/lib.rs b/crates/ruff_cli/src/lib.rs index 0f737628d17e0..b7abecc4a1cb1 100644 --- a/crates/ruff_cli/src/lib.rs +++ b/crates/ruff_cli/src/lib.rs @@ -58,7 +58,7 @@ enum ChangeKind { /// Returns `None` if no relevant changes were detected. fn change_detected(paths: &[PathBuf]) -> Option { // If any `.toml` files were modified, return `ChangeKind::Configuration`. Otherwise, return - // `ChangeKind::SourceFile` if any `.py`, `.pyi`, or `.pyw` files were modified. + // `ChangeKind::SourceFile` if any `.py`, `.pyi`, `.pyw`, or `.ipynb` files were modified. let mut source_file = false; for path in paths { if let Some(suffix) = path.extension() { @@ -66,7 +66,7 @@ fn change_detected(paths: &[PathBuf]) -> Option { Some("toml") => { return Some(ChangeKind::Configuration); } - Some("py" | "pyi" | "pyw") => source_file = true, + Some("py" | "pyi" | "pyw" | "ipynb") => source_file = true, _ => {} } }