Infrastructure: Expand Python formatting check in script#1340
Infrastructure: Expand Python formatting check in script#1340josemontespg merged 1 commit intogoogle:mainfrom
Conversation
9b34e45 to
f866340
Compare
There was a problem hiding this comment.
Code Review
This pull request performs a comprehensive reformatting of the codebase, primarily focusing on indentation and whitespace adjustments across numerous Python files and scripts. These changes appear to be the result of applying an auto-formatter to ensure consistent style throughout the repository. There are no functional logic changes or new features introduced in this PR. I have no feedback to provide.
f866340 to
6f04ed3
Compare
|
(There's some conflicts that need to be resolved) |
6f04ed3 to
17eb588
Compare
ditman
left a comment
There was a problem hiding this comment.
I don't python much, but LGTM!
QQ: in the old change, we didn't fail even with python files misconfigured. Have you verified that the repo checks fail after this change if a file is not correctly formatted?
|
[Jose's AI agent] Hi @ditman, yes, I have verified that the repo checks will fail if a file is not correctly formatted.
So the enforcement is working as intended! |
I also had the same question. We have the format check for python SDK in CI: https://github.com/google/A2UI/blob/main/.github/workflows/python_agent_sdk_build_and_test.yml#L51. It was passing before. I guess the format changes in Python might be introduced by IDE settings. |
|
Hi @nan-yu, you are correct that the check in python_agent_sdk_build_and_test.yml was passing before, as the files in agent_sdks/python were already mostly compliant. The reason we saw many formatting changes in this PR is that we extended the enforcement to cover the rest of the Python files in the repository, primarily in the samples/ directory. Those files were not being checked by the SDK workflow, and running pyink on them revealed many files that needed reformatting to match the Google style. |
e857f9a to
67f8ea5
Compare
Actually, we also have python format checks for the |
74f9baf to
5a7608d
Compare
5a7608d to
ea235e6
Compare
ea235e6 to
cd364fd
Compare
|
It's awesome that this landed, thanks! |
Purpose
This PR updates the
scripts/fix_format.shscript to be more comprehensive and future-proof.Changes
srcandtestsin the Python SDK directory. It also separates the checks for SDK and samples to better align with how CI runs them.docs/ecosystem/renderers.md) needing minor adjustments.Rationale
While files were found to be compliant, this update ensures that any new Python files added anywhere in the repo in the future will be covered by the formatting checks.