in remote_settings/client.py [0:0]
def _paths_for_lang_pair(args):
"""Retrieves all of the file paths for the given language pair and version in args.
Args:
args (argparse.Namespace): The arguments passed through the CLI
Returns:
List[str]: A list of file paths in the specified language-pair directory.
"""
parsed_version = version.parse(args.version)
if parsed_version.is_prerelease:
directory = os.path.join(RemoteSettingsClient._base_dir(args), "dev")
else:
directory = os.path.join(RemoteSettingsClient._base_dir(args), "prod")
full_path = os.path.join(directory, args.lang_pair)
if not os.path.exists(full_path):
print_error(f"Path does not exist: {full_path}")
exit(1)
return [os.path.join(full_path, f) for f in os.listdir(full_path) if not f.endswith(".gz")]