Пример #1
0
def rule_runner() -> RuleRunner:
    return RuleRunner(
        rules=[
            *black_rules(),
            *black_subsystem_rules(),
            *source_files.rules(),
            *config_files.rules(),
            *target_types_rules.rules(),
            QueryRule(FmtResult, (BlackRequest,)),
            QueryRule(SourceFiles, (SourceFilesRequest,)),
        ],
        target_types=[PythonSourcesGeneratorTarget],
    )
Пример #2
0
def rule_runner() -> RuleRunner:
    return RuleRunner(
        rules=[
            format_python_target,
            *black_rules(),
            *isort_rules(),
            *black_subsystem_rules(),
            *isort_subsystem_rules(),
            *source_files.rules(),
            *config_files.rules(),
            QueryRule(LanguageFmtResults, (PythonFmtTargets, )),
        ],
        target_types=[PythonLibrary],
    )