Skip to content

Commit

Permalink
Update crates/ruff/src/rules/pylint/rules/import_private_name.rs
Browse files Browse the repository at this point in the history
Co-authored-by: konsti <konstin@mailbox.org>
  • Loading branch information
tjkuson and konstin authored Aug 1, 2023
1 parent e17469c commit 513614f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/ruff/src/rules/pylint/rules/import_private_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ pub(crate) fn import_private_name(
if level.map_or(false, |level| level > 0) {
return;
}
if let Some(module) = module {
let Some(module) = module else {
return;
}
if module.starts_with("__future__") || module.starts_with("__main__") {
return;
}
Expand Down

0 comments on commit 513614f

Please sign in to comment.