@staticmethod
  def get_config_file_paths(env, args):
    # This exactly mirrors the logic applied in Option to all regular options.  Note that we'll
    # also parse --pants-config as a regular option later, but there's no harm in that.  In fact,
    # it's preferable, so that any code that happens to want to know where we read config from
    # can inspect the option.
    flag = '--pants-config-files='
    evars = ['PANTS_GLOBAL_PANTS_CONFIG_FILES', 'PANTS_PANTS_CONFIG_FILES', 'PANTS_CONFIG_FILES']

    path_list_values = [ListValueComponent.create(get_default_pants_config_file())]
    for var in evars:
      if var in env:
        path_list_values.append(ListValueComponent.create(env[var]))
        break

    for arg in args:
      # Technically this is very slightly incorrect, as we don't check scope.  But it's
      # very unlikely that any task or subsystem will have an option named --pants-config-files.
      # TODO: Enforce a ban on options with a --pants- prefix outside our global options?
      if arg.startswith(flag):
        path_list_values.append(ListValueComponent.create(arg[len(flag):]))

    return ListValueComponent.merge(path_list_values).val
Get the location of the config files.
dataset/ETHPy150Open pantsbuild/pants/src/python/pants/option/options_bootstrapper.py/OptionsBootstrapper.get_config_file_paths