Skip to content

Commit 6d4c516

Browse files
Merge pull request #85709 from charles-zablit/charles-zablit/update-checkout/fix-print-repo-hashes
[update-checkout] fix white space padding when printing the repo hashes
2 parents 0dc1ccf + 76007a0 commit 6d4c516

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
@@ -649,8 +649,9 @@ def repo_hashes(args: CliArguments, config: Dict[str, Any]) -> Dict[str, str]:
649649

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

655656

656657
def merge_no_duplicates(

0 commit comments

Comments
 (0)