def run_diff_quality(violations_type=None, prefix=None, reports=None, percentage_string=None, branch_string=None, dquality_dir=None):
 try:
  sh('{pythonpath_prefix} diff-quality --violations={type} {reports} {percentage_string} {compare_branch_string} --html-report {dquality_dir}/diff_quality_{type}.html '.format(type=violations_type, pythonpath_prefix=prefix, reports=reports, percentage_string=percentage_string, compare_branch_string=branch_string, dquality_dir=dquality_dir))
  return True
 except BuildFailure as error_message:
  if is_percentage_failure(error_message):
   return False
  else:
   raise BuildFailure(error_message)

def run_diff_quality ( violations_type = None , prefix = None , reports = None , percentage_string = None , branch_string = None , dquality_dir = None ) : try : sh ( '{pythonpath_prefix} diff-quality --violations={type} {reports} {percentage_string} {compare_branch_string} --html-report {dquality_dir}/diff_quality_{type}.html ' . format ( type = violations_type , pythonpath_prefix = prefix , reports = reports , percentage_string = percentage_string , compare_branch_string = branch_string , dquality_dir = dquality_dir ) ) return True except BuildFailure as error_message : if is_percentage_failure ( error_message ) : return False else : raise BuildFailure ( error_message )
this executes the diff-quality commandline tool for the given violation type .