def rule_runner() -> RuleRunner: return RuleRunner( rules=[ *import_parser.rules(), *stripped_source_files.rules(), *pex.rules(), QueryRule(ParsedPythonImports, [ParsePythonImportsRequest]), ], target_types=[PythonLibrary], )
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), ]