def _validate_target_typewise(reporter, target_type): if target_type not in [ TARGET_TYPE_NODE, TARGET_TYPE_ATTRIBUTE, TARGET_TYPE_REGEXP ]: reporter.add(reports.invalid_option_type( "target", ["node", "regular expression", "attribute_name=value"] ))
def _validate_target_typewise(reporter, target_type): if target_type not in [ TARGET_TYPE_NODE, TARGET_TYPE_ATTRIBUTE, TARGET_TYPE_REGEXP ]: reporter.append( reports.invalid_option_type( "target", ["node", "regular expression", "attribute_name=value"]))
def _validate_target_typewise(target_type) -> ReportItemList: report_list: ReportItemList = [] if target_type not in [ TARGET_TYPE_NODE, TARGET_TYPE_ATTRIBUTE, TARGET_TYPE_REGEXP ]: report_list.append( reports.invalid_option_type( "target", ["node", "regular expression", "attribute_name=value"])) return report_list