delete failed parse config source
diff --git a/crates/pyrefly_config/src/config.rs b/crates/pyrefly_config/src/config.rs index b618bc1..2e4ed17 100644 --- a/crates/pyrefly_config/src/config.rs +++ b/crates/pyrefly_config/src/config.rs
@@ -171,10 +171,6 @@ /// "marker" file that contains no pyrefly configuration but marks a project root (e.g., a /// `pyproject.toml` file with no `[tool.pyrefly]` section) Marker(PathBuf), - /// We found a config file and attempted to read/parse it, but failed. The config values - /// are defaults, but we respect the file's location for project root detection (similar - /// to `Marker`). - FailedParse(PathBuf), /// This config was synthesized without an on-disk source. The optional path is the inferred /// project root, when one is known. Synthetic(Option<PathBuf>), @@ -226,8 +222,7 @@ match self { Self::File(path) | Self::PythonToolMarker(path) - | Self::Marker(path) - | Self::FailedParse(path) => path.parent(), + | Self::Marker(path) => path.parent(), // Synthetic roots are deliberately excluded Self::Synthetic(_) => None, } @@ -1666,7 +1661,7 @@ Ok(result) => result, Err(e) => { errors.push(ConfigError::error(e)); - (None, ConfigSource::FailedParse(config_path.to_path_buf())) + (None, ConfigSource::File(config_path.to_path_buf())) } }; let mut config = match config_path.parent() {
diff --git a/crates/pyrefly_config/src/finder.rs b/crates/pyrefly_config/src/finder.rs index 2e7fc0b..ee4b0d0 100644 --- a/crates/pyrefly_config/src/finder.rs +++ b/crates/pyrefly_config/src/finder.rs
@@ -174,7 +174,7 @@ |c: &ArcId<ConfigFile>| { matches!( c.source, - ConfigSource::File(_) | ConfigSource::FailedParse(_) + ConfigSource::File(_) ) }, ),
diff --git a/pyrefly/lib/commands/dump_config.rs b/pyrefly/lib/commands/dump_config.rs index a33fb81..3449322 100644 --- a/pyrefly/lib/commands/dump_config.rs +++ b/pyrefly/lib/commands/dump_config.rs
@@ -128,8 +128,7 @@ println!("Default configuration"); } ConfigSource::PythonToolMarker(path) - | ConfigSource::Marker(path) - | ConfigSource::FailedParse(path) => { + | ConfigSource::Marker(path) => { println!( "Default configuration for project root marked by `{}`", path.display()
diff --git a/pyrefly/lib/commands/files.rs b/pyrefly/lib/commands/files.rs index 7de03de..dce8e48 100644 --- a/pyrefly/lib/commands/files.rs +++ b/pyrefly/lib/commands/files.rs
@@ -190,12 +190,6 @@ ConfigSource::File(path) => { info!("Checking project configured at `{}`", path.display()); } - ConfigSource::FailedParse(path) => { - warn!( - "Config at `{}` failed to parse, checking with auto configuration", - path.display() - ); - } ConfigSource::PythonToolMarker(path) | ConfigSource::Marker(path) => { info!( "Found `{}` marking project root, checking root directory with auto configuration",
diff --git a/pyrefly/lib/lsp/non_wasm/server.rs b/pyrefly/lib/lsp/non_wasm/server.rs index b2676be..675206e 100644 --- a/pyrefly/lib/lsp/non_wasm/server.rs +++ b/pyrefly/lib/lsp/non_wasm/server.rs
@@ -3038,8 +3038,7 @@ match &config.source { ConfigSource::Synthetic(_) | ConfigSource::PythonToolMarker(_) - | ConfigSource::Marker(_) - | ConfigSource::FailedParse(_) => TypeErrorDisplayStatus::NoConfigFile, + | ConfigSource::Marker(_) => TypeErrorDisplayStatus::NoConfigFile, ConfigSource::File(_) => { if config.disable_type_errors_in_ide(path) { TypeErrorDisplayStatus::DisabledInConfigFile
diff --git a/pyrefly/lib/state/loader.rs b/pyrefly/lib/state/loader.rs index 5073eff..d6008d3 100644 --- a/pyrefly/lib/state/loader.rs +++ b/pyrefly/lib/state/loader.rs
@@ -65,12 +65,6 @@ p.display() ) } - ConfigSource::FailedParse(p) => { - format!( - " (from default config for `{}` which failed to parse)", - p.display() - ) - } _ => "".to_owned(), }; let nonempty_paths = path