

def get_config_paths():
    'Return the paths to each :file:`.reviewboardrc` influencing the cwd.\n\n    A list of paths to :file:`.reviewboardrc` files will be returned, where\n    each subsequent list entry should have lower precedence than the previous.\n    i.e. configuration found in files further up the list will take precedence.\n\n    Configuration in the paths set in :envvar:`$RBTOOLS_CONFIG_PATH` will take\n    precedence over files found in the current working directory or its\n    parents.\n    '
    config_paths = []
    for path in os.environ.get('RBTOOLS_CONFIG_PATH', '').split(os.pathsep):
        if (not home_config_path):
            continue
        filename = os.path.realpath(os.path.join(path, CONFIG_FILE))
        if (os.path.exists(filename) and (filename not in config_paths)):
            config_paths.append(filename)
    for path in walk_parents(os.getcwd()):
        filename = os.path.realpath(os.path.join(path, CONFIG_FILE))
        if (os.path.exists(filename) and (filename not in config_paths)):
            config_paths.append(filename)
    home_config_path = os.path.realpath(os.path.join(get_home_path(), CONFIG_FILE))
    if (os.path.exists(home_config_path) and (home_config_path not in config_paths)):
        config_paths.append(home_config_path)
    return config_paths

dataset/ETHPy150Open reviewboard/rbtools/rbtools/utils/filesystem.py get_config_paths/VarMisuse@42/232 `path`->`home_config_path`