This is an automated email from the ASF dual-hosted git repository.

github-merge-queue[bot] pushed a commit to branch 
gh-readonly-queue/main/pr-8877-007bf4328a2d0fdc9b0930eb6478e800db28e90c
in repository https://gitbox.apache.org/repos/asf/texera.git

commit b76048948b64e9aa87509c627700f5573c955508
Author: Xinyuan Lin <[email protected]>
AuthorDate: Tue Oct 6 23:16:44 2026 +0000

    refactor(pyamber): remove the unused R TypeVar (#8877)
    
    ### What changes were proposed in this PR?
    
    Removes the unused `R = TypeVar("R")` from pyamber's
    `async_rpc_client.py`, and drops `TypeVar` from its `typing` import,
    which only existed for it. **+1/−3 lines.** There is no behaviour
    change: nothing in the file refers to `R`, and the module's two
    importers (`main_loop.py` and its test) import only `AsyncRPCClient` and
    `async_run`.
    
    ### History
    
    | | |
    | --- | --- |
    | **Introduced by** | #2950 (2024-10-31), "Migrate scala control
    messages to protobuf", together with the `TypeVar` import |
    | **Usage removed by** | **never used**. No annotation, `Generic[R]` or
    string annotation has ever referred to it |
    
    It has been unused for the eleven months since it was added.
    
    ### Any related issues, documentation, discussions?
    
    Closes #8876
    
    ### How was this PR tested?
    
    No new tests.
    
    From `amber/`:
    
    - `ruff check src/main/python src/test/python && ruff format --check
    src/main/python src/test/python`: clean.
    - `python -m pytest -m "not integration"
    src/test/python/core/architecture/rpc/test_async_rpc_client.py`: 12
    tests, all pass.
    
    To re-check:
    
    ```
    git grep -n 'TypeVar("R")'   # no hits
    ```
    
    ### Was this PR authored or co-authored using generative AI tooling?
    
    Generated-by: Claude Code (Claude Opus 5.5)
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
---
 amber/src/main/python/core/architecture/rpc/async_rpc_client.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/amber/src/main/python/core/architecture/rpc/async_rpc_client.py 
b/amber/src/main/python/core/architecture/rpc/async_rpc_client.py
index 98104dbc42..5da6c7d3e3 100644
--- a/amber/src/main/python/core/architecture/rpc/async_rpc_client.py
+++ b/amber/src/main/python/core/architecture/rpc/async_rpc_client.py
@@ -21,7 +21,7 @@ from collections import defaultdict
 from concurrent.futures import Future
 from functools import wraps
 from loguru import logger
-from typing import Dict, TypeVar, Callable, Any, Coroutine
+from typing import Dict, Callable, Any, Coroutine
 
 from core.architecture.managers.context import Context
 from core.models.internal_queue import InternalQueue, DCMElement
@@ -37,8 +37,6 @@ from proto.org.apache.texera.amber.engine.architecture.rpc 
import (
 )
 from proto.org.apache.texera.amber.engine.common import 
DirectControlMessagePayloadV2
 
-R = TypeVar("R")
-
 
 def async_run(func: Callable[..., Any]) -> Callable[..., Any]:
     @wraps(func)

Reply via email to