original_docstring: 
      Compile a scratch and save its score
      
docstring: Compile a scratch and save its score
docstring_tokens: Compile a scratch and save its score
code: def update_scratch_score(scratch: Scratch):
      """
      Compile a scratch and save its score
      """
  
      # TODO remove check once compiler can't be null
      if scratch.compiler:
          compilation, errors = CompilerWrapper.compile_code(scratch.compiler, scratch.cc_opts, scratch.source_code, scratch.context)
  
          diff_output: Optional[Dict[str, Any]] = None
          current_score = -1
  
          if compilation:
              diff_output = AsmDifferWrapper.diff(scratch.target_assembly, compilation, scratch.diff_label)
              current_score = -1 if not diff_output else diff_output.get("current_score", -1)
  
          scratch.score = current_score
          scratch.save()
code_tokens: def update_scratch_score ( scratch : Scratch ) : if scratch . compiler : compilation , errors = CompilerWrapper . compile_code ( scratch . compiler , scratch . cc_opts , scratch . source_code , scratch . context ) diff_output : Optional [ Dict [ str , Any ] ] = None current_score = - 1 if compilation : diff_output = AsmDifferWrapper . diff ( scratch . target_assembly , compilation , scratch . diff_label ) current_score = - 1 if not diff_output else diff_output . get ( "current_score" , - 1 ) scratch . score = current_score scratch . save ( )
short_docstring: Compile a scratch and save its score
short_docstring_tokens: Compile a scratch and save its score
comment: """
      Compile a scratch and save its score
      """$SEP$# TODO remove check once compiler can't be null