Adopted f-strings for consistent Python formatting in tf_env_collect.sh

Replace older %-style string formatting with modern Python 3.6+ f-strings for all
environment info output in tf_env_collect.sh.

This change improves code consistency and readability by unifying the formatting
style across all Python code blocks within the script. F-strings are currently
the recommended standard in Python due to their clarity and performance.

No functionality is changed; the output remains identical. This stylistic update
supports easier ongoing maintenance and makes the codebase more inviting to new
contributors familiar with contemporary Python best practices.

Following the guidelines of clear, imperative, and descriptive commit messages,
this change documents *what* is updated and *why* the update is made, ensuring
future reviewers understand the motivation.

Reference: https://cbea.ms/git-commit/
This commit is contained in:
RasheedAli-Shaik 2025-08-06 16:22:52 +05:30 committed by GitHub
parent 2c72285aa9
commit 15e1af8f94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -59,18 +59,12 @@ echo > "$OUTPUT_FILE"
"${PYTHON_BIN_PATH}" <<EOF
import platform
print("""python version: %s
python branch: %s
python build version: %s
python compiler version: %s
python implementation: %s
""" % (
platform.python_version(),
platform.python_branch(),
platform.python_build(),
platform.python_compiler(),
platform.python_implementation(),
))
print(f"""python version: {platform.python_version()}
python branch: {platform.python_branch()}
python build version: {platform.python_build()}
python compiler version: {platform.python_compiler()}
python implementation: {platform.python_implementation()}
""")
EOF
print_header "check os platform"