/
githubmirror
/
nbs
Обзор
Документация
Войти
/
githubmirror
/
nbs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
build/scripts/process_command_files.py
42 строки
985 B
Anton Myagkov
Update ydb version to 24.4 (#4579)
07 фев 2026, 11:59
Не верифицирован
07 фев 2026, 11:59
2c21cae
Код
Авторство
О чём код?
def is_cmdfile_arg(arg): # type: (str) -> bool return arg.startswith('@') def cmdfile_path(arg): # type: (str) -> str return arg[1:] def read_from_command_file(arg): # type: (str) -> list[str] with open(arg) as afile: return afile.read().splitlines() def skip_markers(args): # type: (list[str]) -> list[str] res = [] for arg in args: if arg == '--ya-start-command-file' or arg == '--ya-end-command-file': continue res.append(arg) return res def iter_args( args, # type: list[str] ): for arg in args: if not is_cmdfile_arg(arg): if arg == '--ya-start-command-file' or arg == '--ya-end-command-file': continue yield arg else: for cmdfile_arg in read_from_command_file(cmdfile_path(arg)): yield cmdfile_arg def get_args(args): # type: (list[str]) -> list[str] return list(iter_args(args))