def __init__(self, *, ast, src, loader, pytd_module, module_name): self.ast = ast self.source = src self.loader = loader self.pytd_module = pytd_module self.resolved_modules = loader.get_resolved_modules() self.imports = xref_utils.process_imports_map(loader.imports_map) self.module_name = module_name self.traces = src.traces self.defs = None self.locs = None self.refs = None self.envs = None self.modules = None self.aliases = None self.typemap = None self.classmap = None self.calls = None self.links = [] self.function_params = None self.function_map = None # Optionally preserve the pytype vm so we can access the types later self.vm = None
def __init__(self, source, loader, module_name, kythe_args=None): self.source = source self.loader = loader self.resolved_modules = loader.get_resolved_modules() self.imports = xref_utils.process_imports_map(loader.imports_map) self.module_name = module_name self.traces = source.traces self.kythe = kythe.Kythe(source, kythe_args) self.defs = None self.locs = None self.refs = None self.envs = None self.modules = None self.typemap = None self.classmap = None self.calls = None self.links = []