Skip to content

Commit d301a67

Browse files
authored
Fix lint (#38032)
* Fix lint * Shrink part of revert
1 parent b090e22 commit d301a67

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sdks/python/apache_beam/ml/inference/agent_development_kit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
from collections.abc import Sequence
5858
from typing import Any
5959
from typing import Optional
60+
from typing import Union
6061

6162
from apache_beam.ml.inference.base import ModelHandler
6263
from apache_beam.ml.inference.base import PredictionResult
@@ -74,12 +75,11 @@
7475
ADK_AVAILABLE = False
7576
genai_Content = Any # type: ignore[assignment, misc]
7677
genai_Part = Any # type: ignore[assignment, misc]
77-
Agent = None
7878

7979
LOGGER = logging.getLogger("ADKAgentModelHandler")
8080

8181
# Type alias for an agent or factory that produces one
82-
_AgentOrFactory = Agent | Callable[[], Agent]
82+
_AgentOrFactory = Union["Agent", Callable[[], "Agent"]]
8383

8484

8585
class ADKAgentModelHandler(ModelHandler[str | genai_Content,

0 commit comments

Comments
 (0)