Skip to content

Commit ba6c7f6

Browse files
authored
[pylint] Remove check for dot in alias name in useless-import-alias (PLC0414) (#14345)
Follow-up to #14287 : when checking that `name` is the same as `as_name` in `import name as as_name`, we do not need to first do an early return if `'.'` is found in `name`.
1 parent 8095ff0 commit ba6c7f6

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

crates/ruff_linter/src/rules/pylint/rules/useless_import_alias.rs

-6
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ pub(crate) fn useless_import_alias(checker: &mut Checker, alias: &Alias) {
5959
let Some(asname) = &alias.asname else {
6060
return;
6161
};
62-
if alias.name.contains('.') {
63-
return;
64-
}
6562
if alias.name.as_str() != asname.as_str() {
6663
return;
6764
}
@@ -97,9 +94,6 @@ pub(crate) fn useless_import_from_alias(
9794
let Some(asname) = &alias.asname else {
9895
return;
9996
};
100-
if alias.name.contains('.') {
101-
return;
102-
}
10397
if alias.name.as_str() != asname.as_str() {
10498
return;
10599
}

0 commit comments

Comments
 (0)