From ec2720c814b83d073ad297ecb120fe071649c193 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Fri, 5 Sep 2025 11:00:45 -0400 Subject: [PATCH] [ruff] Small tweak to import As I was playing around in this file, it was much nicer to just use `cst::` everywhere, similar to what we do with `ruff_python_ast`. --- crates/ruff_linter/src/importer/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ruff_linter/src/importer/mod.rs b/crates/ruff_linter/src/importer/mod.rs index f4939a63d3..fc060a8267 100644 --- a/crates/ruff_linter/src/importer/mod.rs +++ b/crates/ruff_linter/src/importer/mod.rs @@ -6,7 +6,7 @@ use std::error::Error; use anyhow::Result; -use libcst_native::{ImportAlias, Name as cstName, NameOrAttribute}; +use libcst_native as cst; use ruff_python_ast::{self as ast, Expr, ModModule, Stmt}; use ruff_python_codegen::Stylist; @@ -472,8 +472,8 @@ impl<'a> Importer<'a> { let mut statement = match_statement(self.locator.slice(stmt))?; let import_from = match_import_from(&mut statement)?; let aliases = match_aliases(import_from)?; - aliases.push(ImportAlias { - name: NameOrAttribute::N(Box::new(cstName { + aliases.push(cst::ImportAlias { + name: cst::NameOrAttribute::N(Box::new(cst::Name { value: member, lpar: vec![], rpar: vec![],