From c79c16a73e5a879d6c91055c815504676aed4699 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Thu, 21 Sep 2023 12:59:09 +0200 Subject: [PATCH] ci: fix cleanup_ignore_lists.py on windows --- tools/ci/cleanup_ignore_lists.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/ci/cleanup_ignore_lists.py b/tools/ci/cleanup_ignore_lists.py index 94aebd1386..68f718f40d 100755 --- a/tools/ci/cleanup_ignore_lists.py +++ b/tools/ci/cleanup_ignore_lists.py @@ -6,11 +6,12 @@ import glob import os import typing as t +from pathlib import Path from idf_ci_utils import IDF_PATH -def print_list(_list: t.Iterable[str], title: t.Optional[str] = None) -> None: +def print_list(_list: t.Iterable[t.Any], title: t.Optional[str] = None) -> None: if not _list: return @@ -18,15 +19,16 @@ def print_list(_list: t.Iterable[str], title: t.Optional[str] = None) -> None: print(title) for i in _list: - print('- ', i) + print('- ', str(i)) if __name__ == '__main__': os.chdir(IDF_PATH) - ignore_lists = set() - ignore_lists.update(glob.glob('tools/ci/*.txt', recursive=True)) - ignore_lists.remove('tools/ci/ignore_build_warnings.txt') - ignore_lists.remove('tools/ci/check_ldgen_mapping_exceptions.txt') + ignore_lists: t.Set[Path] = set() + ignore_lists.update(Path('tools', 'ci').glob('**/*.txt')) + ignore_lists.remove(Path('tools', 'ci', 'ignore_build_warnings.txt')) + ignore_lists.remove(Path('tools', 'ci', 'check_ldgen_mapping_exceptions.txt')) + print_list(ignore_lists, 'Ignore lists:') updated_files = []