mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 02:39:12 +00:00
Upgrade Rust toolchain to 1.84.0 (#15408)
This commit is contained in:
parent
2d82445794
commit
c39ca8fe6d
18 changed files with 36 additions and 45 deletions
|
@ -1002,24 +1002,21 @@ impl<'a> SemanticModel<'a> {
|
|||
let value_name = UnqualifiedName::from_expr(value)?;
|
||||
let (_, tail) = value_name.segments().split_first()?;
|
||||
|
||||
let resolved: QualifiedName = if qualified_name
|
||||
.segments()
|
||||
.first()
|
||||
.map_or(false, |segment| *segment == ".")
|
||||
{
|
||||
from_relative_import(
|
||||
self.module.qualified_name()?,
|
||||
qualified_name.segments(),
|
||||
tail,
|
||||
)?
|
||||
} else {
|
||||
qualified_name
|
||||
.segments()
|
||||
.iter()
|
||||
.chain(tail)
|
||||
.copied()
|
||||
.collect()
|
||||
};
|
||||
let resolved: QualifiedName =
|
||||
if qualified_name.segments().first().copied() == Some(".") {
|
||||
from_relative_import(
|
||||
self.module.qualified_name()?,
|
||||
qualified_name.segments(),
|
||||
tail,
|
||||
)?
|
||||
} else {
|
||||
qualified_name
|
||||
.segments()
|
||||
.iter()
|
||||
.chain(tail)
|
||||
.copied()
|
||||
.collect()
|
||||
};
|
||||
Some(resolved)
|
||||
}
|
||||
BindingKind::Builtin => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue