mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-01 17:32:25 +00:00
Avoid cloning Name
when looking up function and class types (#14092)
This commit is contained in:
parent
a7a78f939c
commit
bc0586d922
5 changed files with 27 additions and 4 deletions
|
@ -13,7 +13,7 @@ license = { workspace = true }
|
|||
[dependencies]
|
||||
ruff_db = { workspace = true }
|
||||
ruff_index = { workspace = true }
|
||||
ruff_python_ast = { workspace = true }
|
||||
ruff_python_ast = { workspace = true, features = ["salsa"] }
|
||||
ruff_python_stdlib = { workspace = true }
|
||||
ruff_source_file = { workspace = true }
|
||||
ruff_text_size = { workspace = true }
|
||||
|
|
|
@ -856,7 +856,7 @@ impl<'db> TypeInferenceBuilder<'db> {
|
|||
};
|
||||
let function_ty = Type::FunctionLiteral(FunctionType::new(
|
||||
self.db,
|
||||
name.id.clone(),
|
||||
&*name.id,
|
||||
function_kind,
|
||||
definition,
|
||||
decorator_tys,
|
||||
|
@ -965,7 +965,7 @@ impl<'db> TypeInferenceBuilder<'db> {
|
|||
|
||||
let class_ty = Type::ClassLiteral(ClassType::new(
|
||||
self.db,
|
||||
name.id.clone(),
|
||||
&*name.id,
|
||||
definition,
|
||||
body_scope,
|
||||
maybe_known_class,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue