code: def check(self):
      
      errors = []
      results = []
      for fn in self._files:
        if not os.path.isdir(fn):
          try:
            with open(fn, 'r') as f:
              line_ct = 1
              for line in f:
                for word in split_words(line):
                  if (word in self._misspelling_dict or
                      word.lower() in self._misspelling_dict):
                    results.append([fn, line_ct, word])
                line_ct += 1
          except UnicodeDecodeError:
            pass
          except IOError:
            errors.append('%s' % sys.exc_info()[1])
      return errors, results
docs: Checks the files for misspellings.
  
      Returns:
        (errors, results)
        errors: List of system errors, usually file access errors.
        results: List of spelling errors - each tuple is filename,
                 line number and misspelled word.