def make_resolver(self, filename, module_name): module = resolve.Local(filename, module_name, self.py_fs) return resolve.Resolver(self.path, module)
def ordered_deps_list(self): deps = [] for k, v in self.deps_list(): deps.append((k, sorted(v))) return list(sorted(deps)) def ordered_sorted_source_files(self): return [list(sorted(x)) for x in self.sorted_source_files()] # Deps = { file : ([resolved deps], [broken deps], {dep_file:provenance}) } SIMPLE_DEPS = { "a.py": (["b.py", "c.py"], [], {"b.py": resolve.Local("b.py", "b", "fs1"), "c.py": resolve.Local("c.py", "c", "fs2") }), "b.py": (["d.py"], ["e"], {"d.py": resolve.System("d.py", "d")}) } SIMPLE_NONPY_DEPS = {"a.pyi": (["b.py"], [], {})} SIMPLE_CYCLIC_DEPS = { "a.py": (["b.py", "c.py"], ["e"], {}), "b.py": (["d.py", "a.py"], ["f"], {}), } SIMPLE_SYSTEM_DEPS = { "a.py": (["b.py"], [], {"b.py": resolve.System("b.py", "b")}),