Skip to content

Commit

Permalink
[pylint] Remove check for dot in alias name in `useless-import-alia…
Browse files Browse the repository at this point in the history
…s (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`.
  • Loading branch information
dylwil3 authored Nov 14, 2024
1 parent 8095ff0 commit ba6c7f6
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ pub(crate) fn useless_import_alias(checker: &mut Checker, alias: &Alias) {
let Some(asname) = &alias.asname else {
return;
};
if alias.name.contains('.') {
return;
}
if alias.name.as_str() != asname.as_str() {
return;
}
Expand Down Expand Up @@ -97,9 +94,6 @@ pub(crate) fn useless_import_from_alias(
let Some(asname) = &alias.asname else {
return;
};
if alias.name.contains('.') {
return;
}
if alias.name.as_str() != asname.as_str() {
return;
}
Expand Down

0 comments on commit ba6c7f6

Please sign in to comment.