From 9aebd01aebac339c16b2d001688a98055ee230c7 Mon Sep 17 00:00:00 2001 From: "Michael (XIAO Xufeng)" Date: Mon, 26 Apr 2021 15:46:44 +0800 Subject: [PATCH] ci: fix check_executables issue on Windows --- tools/ci/idf_ci_utils.py | 8 ++++---- tools/ci/mypy_ignore_list.txt | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/ci/idf_ci_utils.py b/tools/ci/idf_ci_utils.py index bcb12ea491..d57e88b624 100644 --- a/tools/ci/idf_ci_utils.py +++ b/tools/ci/idf_ci_utils.py @@ -56,8 +56,8 @@ def _check_git_filemode(full_path): # type: (str) -> bool mode = stdout.split(' ', 1)[0] # e.g. 100644 for a rw-r--r-- if any([int(i, 8) & 1 for i in mode[-3:]]): - return False - return True + return True + return False def is_executable(full_path): # type: (str) -> bool @@ -90,7 +90,7 @@ def get_git_files(path=IDF_PATH, full_path=False): # type: (str, bool) -> list[ # https://github.com/python/cpython/pull/6299/commits/bfd63120c18bd055defb338c075550f975e3bec1 # In order to solve python https://bugs.python.org/issue9584 # glob pattern does not support brace expansion issue -def _translate(pat): +def _translate(pat): # type: (str) -> str """Translate a shell PATTERN to a regular expression. There is no way to quote meta-characters. """ @@ -179,7 +179,7 @@ def _translate(pat): return res -def translate(pat): +def translate(pat): # type: (str) -> str res = _translate(pat) return r'(?s:%s)\Z' % res diff --git a/tools/ci/mypy_ignore_list.txt b/tools/ci/mypy_ignore_list.txt index 422bc8aa1e..2d8f0cbe62 100644 --- a/tools/ci/mypy_ignore_list.txt +++ b/tools/ci/mypy_ignore_list.txt @@ -171,7 +171,6 @@ tools/ci/checkout_project_ref.py tools/ci/ci_fetch_submodule.py tools/ci/deploy_docs.py tools/ci/envsubst.py -tools/ci/idf_ci_utils.py tools/ci/normalize_clangtidy_path.py tools/ci/python_packages/gitlab_api.py tools/ci/python_packages/idf_http_server_test/adder.py