def GetChangedPythonFiles(self, diffbase=None):
    """Retrieves the changed Python files.

    Note that several Python files are excluded:
    * Python files generated by the protobuf compiler (*_pb2.py)
    * Python files used as test data (test_data/*.py)
    * Python files used for sphinx (docs/*.py)
    * setup.py and utils/upload.py

    Args:
      diffbase: optional string containing the git diffbase
                e.g. upstream/master.

    Returns:
      List containing string with the names of the changed Python files.
    """
    upload_path = os.path.join(u'utils', u'upload.py')
    python_files = []
    for changed_file in self.GetChangedFiles(diffbase=diffbase):
      if (not changed_file.endswith(u'.py') or
          changed_file.endswith(u'_pb2.py') or
          not os.path.exists(changed_file) or
          changed_file.startswith(u'docs') or
          changed_file.startswith(u'test_data') or
          changed_file in (u'setup.py', upload_path)):
        continue

      python_files.append(changed_file)

    return python_files
dataset/ETHPy150Open log2timeline/dfvfs/utils/review.py/GitHelper.GetChangedPythonFiles/original