def annotate_validation_results(results):
 if isinstance(results, dict):
  validation = results
 else:
  from .utils import ValidationComparator
  validation = ValidationComparator(results[1]).compare_results(results[0])
 validation.setdefault('signing_summary', {'trivial': 0, 'low': 0, 'medium': 0, 'high': 0})
 validation['passed_auto_validation'] = addon_can_be_signed(validation)
 if (not settings.SIGNING_SERVER):
  validation = skip_signing_warning(validation)
 return validation

def annotate_validation_results ( results ) : if isinstance ( results , dict ) : validation = results else : from . utils import ValidationComparator validation = ValidationComparator ( results [ 1 ] ) . compare_results ( results [ 0 ] ) validation . setdefault ( 'signing_summary' , { 'trivial' : 0 , 'low' : 0 , 'medium' : 0 , 'high' : 0 } ) validation [ 'passed_auto_validation' ] = addon_can_be_signed ( validation ) if ( not settings . SIGNING_SERVER ) : validation = skip_signing_warning ( validation ) return validation
annotates validation results with information such as whether the results pass auto validation .