We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb4f142 commit 5593599Copy full SHA for 5593599
crates/ty_python_semantic/src/types.rs
@@ -8344,12 +8344,9 @@ impl<'db> ModuleLiteralType<'db> {
8344
.map(|file| imported_symbol(db, file, name, None))
8345
.unwrap_or_default();
8346
8347
- // If the normal lookup failed, try to call the module's __getattr__ function
+ // If the normal lookup failed, try to call the module's `__getattr__` function
8348
if result.place.is_unbound() {
8349
- let getattr_result = self.try_module_getattr(db, name);
8350
- if !getattr_result.place.is_unbound() {
8351
- return getattr_result;
8352
- }
+ return self.try_module_getattr(db, name);
8353
}
8354
8355
result
0 commit comments