File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
crates/ty_python_semantic/src Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -8338,21 +8338,18 @@ impl<'db> ModuleLiteralType<'db> {
83388338 }
83398339 }
83408340
8341- let result = self
8341+ let place_and_qualifiers = self
83428342 . module ( db)
83438343 . file ( db)
83448344 . map ( |file| imported_symbol ( db, file, name, None ) )
83458345 . unwrap_or_default ( ) ;
83468346
8347- // 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- }
8347+ // If the normal lookup failed, try to call the module's `__getattr__` function
8348+ if place_and_qualifiers. place . is_unbound ( ) {
8349+ return self . try_module_getattr ( db, name) ;
83538350 }
83548351
8355- result
8352+ place_and_qualifiers
83568353 }
83578354}
83588355
You can’t perform that action at this time.
0 commit comments