Skip to content

Commit 653cb83

Browse files
[update-checkout] fix white space padding when printing the repo hashes
1 parent 1885c9b commit 653cb83

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

utils/update_checkout/update_checkout/update_checkout.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,8 +650,9 @@ def repo_hashes(args: CliArguments, config: Dict[str, Any]) -> Dict[str, str]:
650650

651651
def print_repo_hashes(args: CliArguments, config: Dict[str, Any]):
652652
repos = repo_hashes(args, config)
653+
max_length = max(len(name) for name in repos.keys())
653654
for repo_name, repo_hash in sorted(repos.items(), key=lambda x: x[0]):
654-
print("{:<35}: {:<35}".format(repo_name, repo_hash))
655+
print("{:<{width}}: {}".format(repo_name, repo_hash, width=max_length + 1))
655656

656657

657658
def merge_no_duplicates(

0 commit comments

Comments
 (0)