def rules(cls): return ( *super().rules(), *mypy_rules(), *dependency_inference_rules.rules( ), # Used for `__init__.py` inference. QueryRule(TypecheckResults, (MyPyRequest, OptionsBootstrapper)), )
def rules(cls): return ( *super().rules(), *mypy_rules(), RootRule(MyPyRequest), # mypy needs __init__.py files in many cases: we pull in inference to avoid boilerplate. *dependency_inference_rules.rules(), )
def rule_runner() -> RuleRunner: return RuleRunner( rules=[ *mypy_rules(), *dependency_inference_rules.rules(), # Used for import inference. QueryRule(TypecheckResults, (MyPyRequest, )), ], target_types=[PythonLibrary, PythonRequirementLibrary], )
def rule_runner() -> RuleRunner: return RuleRunner( rules=[ *mypy_rules(), *mypy_subystem_rules(), *dependency_inference_rules.rules(), # Used for import inference. *pants_bin.rules(), *config_files.rules(), *target_types_rules.rules(), QueryRule(CheckResults, (MyPyRequest,)), ], target_types=[PythonSourcesGeneratorTarget, PythonRequirementTarget], )