def onUsedModule(self, module_name, module_relpath): assert type(module_name) is str, module_name # TODO: Make users provide this through a method that has already # done this. module_relpath = relpath(module_relpath) self.used_modules.add((module_name, module_relpath)) module = getImportedModuleByNameAndPath(module_name, module_relpath) addUsedModule(module)