code: def run(self):
      
      if self.exclude_from_doctest:
        for pattern in self.exclude_from_doctest:
          if fnmatch.fnmatch(self.filename, pattern):
            return
  
      checked_codes = pep257.conventions.pep257 | {'D998', 'D999'}
      for error in self._check_source():
        if isinstance(error, pep257.Error) and error.code in checked_codes:
          # NOTE(sigmavirus24): Fixes GitLab#3
          message = '%s %s' % (error.code, error.short_desc)
          yield (error.line, 0, message, type(self))
docs: Use directly check() api from pydocstyle.