Ejemplo n.º 1
0
def rule_runner() -> RuleRunner:
    return RuleRunner(
        rules=[
            *import_parser.rules(),
            *stripped_source_files.rules(),
            *pex.rules(),
            QueryRule(ParsedPythonImports, [ParsePythonImportsRequest]),
        ],
        target_types=[PythonLibrary],
    )
Ejemplo n.º 2
0
def import_rules():
    return [
        infer_python_dependencies_via_imports,
        *pex.rules(),
        *import_parser.rules(),
        *module_mapper.rules(),
        *stripped_source_files.rules(),
        SubsystemRule(PythonInferSubsystem),
        SubsystemRule(PythonSetup),
        UnionRule(InferDependenciesRequest, InferPythonImportDependencies),
    ]