Skip to content

Commit b557949

Browse files
committed
Fix linter issues
1 parent 9a768de commit b557949

File tree

3 files changed

+39
-22
lines changed

3 files changed

+39
-22
lines changed

azure/durable_functions/decorators/durable_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Licensed under the MIT License.
33

44
from azure.durable_functions.models.RetryOptions import RetryOptions
5-
from .metadata import OrchestrationTrigger, ActivityTrigger, EntityTrigger,\
5+
from .metadata import OrchestrationTrigger, ActivityTrigger, EntityTrigger, \
66
DurableClient
77
from typing import Callable, Optional
88
from azure.durable_functions.entity import Entity

azure/durable_functions/openai_agents/handoffs.py

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,18 @@ class DurableHandoff(BaseModel):
2525
def from_handoff(cls, handoff: Handoff) -> "DurableHandoff":
2626
"""Create a DurableHandoff from an OpenAI agent Handoff.
2727
28-
Args:
29-
----
30-
handoff: The OpenAI agent Handoff to convert
28+
This method converts OpenAI agent Handoff instances into serializable
29+
DurableHandoff objects for use within Azure Durable Functions.
3130
32-
Returns:
31+
Parameters
32+
----------
33+
handoff : Handoff
34+
The OpenAI agent Handoff to convert
35+
36+
Returns
3337
-------
34-
DurableHandoff: A serializable handoff representation
38+
DurableHandoff
39+
A serializable handoff representation
3540
"""
3641
return cls(
3742
tool_name=handoff.tool_name,
@@ -44,9 +49,13 @@ def from_handoff(cls, handoff: Handoff) -> "DurableHandoff":
4449
def to_handoff(self) -> Handoff[Any, Any]:
4550
"""Create an OpenAI agent Handoff instance from this DurableHandoff.
4651
47-
Returns:
52+
This method converts the serializable DurableHandoff back into an
53+
OpenAI agent Handoff instance for execution.
54+
55+
Returns
4856
-------
49-
Handoff: OpenAI agent Handoff instance
57+
Handoff
58+
OpenAI agent Handoff instance
5059
"""
5160
return Handoff(
5261
tool_name=self.tool_name,

azure/durable_functions/openai_agents/tools.py

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,20 @@ def create_tool_from_durable_tool(
6868
This function transforms Durable Functions tool definitions into actual
6969
OpenAI agent Tool instances that can be used during model execution.
7070
71-
Args:
72-
----
73-
durable_tool: The Durable tool definition to convert
71+
Parameters
72+
----------
73+
durable_tool : DurableTool
74+
The Durable tool definition to convert
7475
75-
Returns:
76+
Returns
7677
-------
77-
Tool: An OpenAI agent Tool instance ready for execution
78+
Tool
79+
An OpenAI agent Tool instance ready for execution
7880
79-
Raises:
80-
UserError: If the tool type is not supported
81+
Raises
82+
------
83+
UserError
84+
If the tool type is not supported
8185
"""
8286
# Built-in tools that don't need conversion
8387
if isinstance(durable_tool, BUILT_IN_TOOL_TYPES):
@@ -108,16 +112,20 @@ def convert_tool_to_durable_tool(tool: Tool) -> DurableTool:
108112
This function transforms OpenAI agent Tool instances into Durable Functions
109113
tool definitions that can be serialized and passed to activities.
110114
111-
Args:
112-
----
113-
tool: The OpenAI agent Tool to convert
115+
Parameters
116+
----------
117+
tool : Tool
118+
The OpenAI agent Tool to convert
114119
115-
Returns:
120+
Returns
116121
-------
117-
DurableTool: A serializable tool definition
122+
DurableTool
123+
A serializable tool definition
118124
119-
Raises:
120-
ValueError: If the tool type is not supported for conversion
125+
Raises
126+
------
127+
ValueError
128+
If the tool type is not supported for conversion
121129
"""
122130
# Built-in tools that can be serialized directly
123131
if isinstance(tool, BUILT_IN_TOOL_TYPES):

0 commit comments

Comments
 (0)