def get_pylint_errors(pylint_output):
  """The Pylint py_run function yields a list of warnings and errors. This function filters out warnings and only yields errors

  Returns:
    List of errors
  """
  error_list = []
  for message in pylint_output:
    if 'error' in message:
      error_list.append(message)
  return error_list