File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -190,10 +190,17 @@ public void LoadNames()
190190 foreach ( string name in AssemblyManager . GetNames ( _namespace ) )
191191 {
192192 cache . TryGetValue ( name , out m ) ;
193- if ( m = = null )
193+ if ( m ! = null )
194194 {
195- ManagedType attr = GetAttribute ( name , true ) ;
195+ continue ;
196196 }
197+ IntPtr attr = Runtime . PyDict_GetItemString ( dict , name ) ;
198+ // If __dict__ has already set a custom property, skip it.
199+ if ( attr != IntPtr . Zero )
200+ {
201+ continue ;
202+ }
203+ GetAttribute ( name , true ) ;
197204 }
198205 }
199206
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ def test_relative_missing_import():
1414
1515
1616def test_import_all_on_second_time ():
17- """Test import all attributes after a normal.
17+ """Test import all attributes after a normal import without '*' .
1818 Due to import * only allowed at module level, the test body splited
1919 to a module file."""
2020 from . import importtest
You can’t perform that action at this time.
0 commit comments