From 6e8d561090f50b5c1a62618f4ee9de68f48017ef Mon Sep 17 00:00:00 2001 From: Evan Rittenhouse Date: Wed, 19 Apr 2023 22:33:12 -0500 Subject: [PATCH] Support --fix in watch mode (#4035) --- crates/ruff_cli/src/lib.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/crates/ruff_cli/src/lib.rs b/crates/ruff_cli/src/lib.rs index f8bb63a49b6bb..0d3b83a88969e 100644 --- a/crates/ruff_cli/src/lib.rs +++ b/crates/ruff_cli/src/lib.rs @@ -179,9 +179,6 @@ fn check(args: CheckArgs, log_level: LogLevel) -> Result { let printer = Printer::new(format, log_level, autofix, printer_flags); if cli.watch { - if !matches!(autofix, flags::FixMode::None) { - warn_user_once!("--fix is unsupported in watch mode."); - } if format != SerializationFormat::Text { warn_user_once!("--format 'text' is used in watch mode."); } @@ -226,7 +223,7 @@ fn check(args: CheckArgs, log_level: LogLevel) -> Result { &overrides, cache.into(), noqa.into(), - flags::FixMode::None, + autofix, )?; printer.write_continuously(&messages)?; }