diff --git a/crates/ruff_server/src/session/index.rs b/crates/ruff_server/src/session/index.rs index aa5a1efcad712..706cd96d12990 100644 --- a/crates/ruff_server/src/session/index.rs +++ b/crates/ruff_server/src/session/index.rs @@ -465,7 +465,7 @@ impl DocumentQuery { /// Get the source type of the document associated with this query. pub(crate) fn source_type(&self) -> ruff_python_ast::PySourceType { match self { - Self::Text { .. } => ruff_python_ast::PySourceType::Python, + Self::Text { .. } => ruff_python_ast::PySourceType::from(self.file_path()), Self::Notebook { .. } => ruff_python_ast::PySourceType::Ipynb, } }