def get_available_pipeline_parts(): pipeline_parts = {} for cls in all_subclasses(Transform): if cls.name: pipeline_parts[cls.name] = cls return pipeline_parts
def get_lint_rules(with_names=False): lint_rules = {} for cls in all_subclasses(TemplateLintRule): if cls.num: lint_rules[cls.num] = cls if with_names and cls.name: lint_rules[cls.name] = cls return lint_rules
def get_available_lint_rules(name_and_num=False): lint_rules = {} for cls in all_subclasses(LintRule): if cls.num: lint_rules[cls.num] = cls if name_and_num and cls.name: lint_rules[cls.name] = cls return lint_rules