Finder now looks for an exact match of the module that originally defined the class, by name
This commit is contained in:
parent
86837677b6
commit
85de2b40df
|
|
@ -16,7 +16,11 @@ def findClassInModule(module, className, visited):
|
|||
classObj = module.__dict__.get(className)
|
||||
if classObj and ((type(classObj) == types.ClassType) or
|
||||
(type(classObj) == types.TypeType)):
|
||||
return [classObj, module.__dict__]
|
||||
if classObj.__module__ == module.__name__:
|
||||
return [classObj, module.__dict__]
|
||||
else:
|
||||
# print "Must have found a module that imported this class", classObj, module
|
||||
pass
|
||||
|
||||
# Now filter out all the modules and iterate through them
|
||||
moduleList = filter(lambda value: type(value) == types.ModuleType, module.__dict__.values())
|
||||
|
|
|
|||
Loading…
Reference in New Issue