Remove relative import handling from BindingKind::Import case (#6084)

## Summary

Only `ImportFrom` imports can be relative, this is just unused.
This commit is contained in:
Charlie Marsh 2023-07-26 00:17:41 -04:00 committed by GitHub
parent 96d2ca0bda
commit c8ee357613
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -578,19 +578,9 @@ impl<'a> SemanticModel<'a> {
BindingKind::Import(Import {
qualified_name: name,
}) => {
if name.starts_with('.') {
let mut source_path = from_relative_import(self.module_path?, name);
if source_path.is_empty() {
None
} else {
source_path.extend_from_slice(tail);
Some(source_path)
}
} else {
let mut source_path: CallPath = from_unqualified_name(name);
source_path.extend_from_slice(tail);
Some(source_path)
}
let mut source_path: CallPath = from_unqualified_name(name);
source_path.extend_from_slice(tail);
Some(source_path)
}
BindingKind::SubmoduleImport(SubmoduleImport {
qualified_name: name,