parameters: (output_dir, html)
return_statement: return (bug for bug in bugs if not duplicate(bug))
docstring: Generate a unique sequence of bugs from given output directory.
  
      Duplicates can be in a project if the same module was compiled multiple
      times with different compiler options. These would be better to show in
      the final report (cover) only once.
docstring_summary: Generate a unique sequence of bugs from given output directory.
docstring_tokens: Generate a unique sequence of bugs from given output directory .
function: def read_bugs(output_dir, html):
      """ Generate a unique sequence of bugs from given output directory.
  
      Duplicates can be in a project if the same module was compiled multiple
      times with different compiler options. These would be better to show in
      the final report (cover) only once. """
  
      parser = parse_bug_html if html else parse_bug_plist
      pattern = '*.html' if html else '*.plist'
  
      duplicate = duplicate_check(
          lambda bug: '{bug_line}.{bug_path_length}:{bug_file}'.format(**bug))
  
      bugs = itertools.chain.from_iterable(
          # parser creates a bug generator not the bug itself
          parser(filename)
          for filename in glob.iglob(os.path.join(output_dir, pattern)))
  
      return (bug for bug in bugs if not duplicate(bug))
function_tokens: def read_bugs ( output_dir , html ) : parser = parse_bug_html if html else parse_bug_plist pattern = '*.html' if html else '*.plist' duplicate = duplicate_check ( lambda bug : '{bug_line}.{bug_path_length}:{bug_file}' . format ( * * bug ) ) bugs = itertools . chain . from_iterable ( # parser creates a bug generator not the bug itself parser ( filename ) for filename in glob . iglob ( os . path . join ( output_dir , pattern ) ) ) return ( bug for bug in bugs if not duplicate ( bug ) )