From f31b3414f67dc84d5205186a02f5896b062186f9 Mon Sep 17 00:00:00 2001 From: Holt Skinner Date: Mon, 2 Jun 2025 15:30:23 -0500 Subject: [PATCH 1/6] ci: Add auto-format workflow --- .github/workflows/auto-format.yml | 48 +++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/auto-format.yml diff --git a/.github/workflows/auto-format.yml b/.github/workflows/auto-format.yml new file mode 100644 index 00000000..1985f588 --- /dev/null +++ b/.github/workflows/auto-format.yml @@ -0,0 +1,48 @@ +name: Auto-format with Nox + +on: + pull_request: + branches: + - main + +permissions: + contents: write + +jobs: + format: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + token: ${{ secrets.A2A_BOT_PAT }} + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Install Nox + run: pip install nox + + - name: Run Nox formatting session + run: nox -s format + + - name: Check for changes and commit if any + id: commit_changes + run: | + git config user.name "a2a-bot" + git config user.email "a2a-bot@google.com" + + # Check if there are any changes after running Nox + if [ -n "$(git status --porcelain)" ]; then + echo "::notice file=./.github/workflows/auto-format.yml::Formatting changes detected. Committing..." + git add . + git commit -m "chore(format): Auto-format code with Nox" + git push origin HEAD:${{ github.event.pull_request.head.ref }} + echo "changes_committed=true" >> "$GITHUB_OUTPUT" + else + echo "No formatting changes detected. Repository is clean." + echo "changes_committed=false" >> "$GITHUB_OUTPUT" + fi From 2de8a4e9491d8559acd7185f47d760878383293c Mon Sep 17 00:00:00 2001 From: Holt Skinner Date: Mon, 2 Jun 2025 15:36:24 -0500 Subject: [PATCH 2/6] Fix python version --- .github/workflows/auto-format.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-format.yml b/.github/workflows/auto-format.yml index 1985f588..1f6afb1f 100644 --- a/.github/workflows/auto-format.yml +++ b/.github/workflows/auto-format.yml @@ -21,7 +21,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.x" + python-version: "3.10" - name: Install Nox run: pip install nox From d2cbee1723a76733e8ced56055b65005e9ef16d7 Mon Sep 17 00:00:00 2001 From: Holt Skinner Date: Mon, 2 Jun 2025 15:37:59 -0500 Subject: [PATCH 3/6] Update branch --- noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index e541b2bb..7d85ea64 100644 --- a/noxfile.py +++ b/noxfile.py @@ -52,7 +52,7 @@ def format(session): if format_all: lint_paths_py = ['.'] else: - target_branch = 'origin/main' + target_branch = 'main' unstaged_files = subprocess.run( [ From 032e6f183ff670b8c77e970d59843c721645a8a2 Mon Sep 17 00:00:00 2001 From: Holt Skinner Date: Mon, 2 Jun 2025 15:39:14 -0500 Subject: [PATCH 4/6] Test change --- .github/actions/spelling/allow.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/spelling/allow.txt b/.github/actions/spelling/allow.txt index 8e922ba9..cf00bf92 100644 --- a/.github/actions/spelling/allow.txt +++ b/.github/actions/spelling/allow.txt @@ -25,6 +25,7 @@ datamodel dunders genai gle + inmemory kwarg langgraph From 3cb0404bc908b65f46d45234e9ffd9462f0c9c7b Mon Sep 17 00:00:00 2001 From: a2a-bot Date: Mon, 2 Jun 2025 20:39:33 +0000 Subject: [PATCH 5/6] chore(format): Auto-format code with Nox --- .github/actions/spelling/allow.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/spelling/allow.txt b/.github/actions/spelling/allow.txt index cf00bf92..7452be99 100644 --- a/.github/actions/spelling/allow.txt +++ b/.github/actions/spelling/allow.txt @@ -1,3 +1,4 @@ + ACard AClient AError @@ -25,7 +26,6 @@ datamodel dunders genai gle - inmemory kwarg langgraph From 3856e68f38cac8b684cba4a65d1d1493cdcf8efb Mon Sep 17 00:00:00 2001 From: Holt Skinner Date: Mon, 2 Jun 2025 15:40:21 -0500 Subject: [PATCH 6/6] Updatre --- .github/actions/spelling/allow.txt | 1 - src/a2a/server/request_handlers/request_handler.py | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/spelling/allow.txt b/.github/actions/spelling/allow.txt index 7452be99..8e922ba9 100644 --- a/.github/actions/spelling/allow.txt +++ b/.github/actions/spelling/allow.txt @@ -1,4 +1,3 @@ - ACard AClient AError diff --git a/src/a2a/server/request_handlers/request_handler.py b/src/a2a/server/request_handlers/request_handler.py index 811c8da2..a6fe7e20 100644 --- a/src/a2a/server/request_handlers/request_handler.py +++ b/src/a2a/server/request_handlers/request_handler.py @@ -22,6 +22,7 @@ class RequestHandler(ABC): provide to handle incoming JSON-RPC requests. """ + @abstractmethod async def on_get_task( self,