diff --git a/examples/chef/chef.py b/examples/chef/chef.py index 080324f98d94a7..cf037d079a8568 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -98,12 +98,12 @@ def check_python_version() -> None: def check_zap(master: bool = False) -> str: - """Produces hash of ZAP submodule + """Produces hash of ZAP submodule. Args: - master: check branch master instead of current branch + master: Check branch master instead of current branch. Returns: - SHA of zap submodule + SHA of zap submodule. """ shell.run_cmd(f"cd {_REPO_BASE_PATH}") if master: @@ -116,10 +116,9 @@ def check_zap(master: bool = False) -> str: return_cmd_output=True).replace("\n", "") command = f"git ls-tree {branch} third_party/zap/repo" zap_commit = shell.run_cmd(command, return_cmd_output=True) - flush_print(f"Raw zap commit {zap_commit}") zap_commit = zap_commit.split(" ")[2] zap_commit = zap_commit[:zap_commit.index("\t")] - flush_print(f"zap commit: {zap_commit}") + flush_print(f"found zap commit: {zap_commit}") return zap_commit @@ -129,8 +128,8 @@ def generate_device_manifest( """Produces dictionary containing md5 of device dir zap files. Args: - write_manifest_file: Serialize manifest in file and tree - zap_check_master: deprecated - check master instead of HEAD for zap + write_manifest_file: Serialize manifest in file and tree. + zap_check_master: Check master instead of HEAD for zap. Returns: Dict containing MD5 of device dir zap files. """ @@ -171,13 +170,11 @@ def load_cicd_config() -> Dict[str, Any]: def flush_print( to_print: str, with_border: bool = False) -> None: - """Prints and flushes stdout buffer + """Prints and flushes stdout buffer. Args: - to_print: The string to print - with_border: Add boarder above and below to_print - Returns: - None + to_print: The string to print. + with_border: Add boarder above and below to_print. """ if with_border: border = ('-' * 64) + '\n' @@ -389,7 +386,6 @@ def main(argv: Sequence[str]) -> None: if options.build_all: # TODO - # Needs testing after refactor # Needs to call per-platform bundle function flush_print("Build all disabled") exit(1)