Skip to content

Commit 136b40a

Browse files
committed
lint fixes
1 parent b5e63be commit 136b40a

3 files changed

Lines changed: 4 additions & 12 deletions

File tree

openai_agents/run_customer_service_client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import argparse
22
import asyncio
3-
from ftplib import print_line
43

54
from temporalio import workflow
65
from temporalio.client import (
@@ -73,7 +72,7 @@ async def main():
7372
history.extend(new_history)
7473
print(*new_history, sep="\n")
7574
except WorkflowUpdateFailedError:
76-
print_line("** Stale conversation. Reloading...")
75+
print("** Stale conversation. Reloading...")
7776
length = len(history)
7877
history = await handle.query(
7978
CustomerServiceWorkflow.get_chat_history,

openai_agents/workflows/customer_service_workflow.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,15 @@ class ProcessUserMessageInput(BaseModel):
148148

149149
@workflow.defn
150150
class CustomerServiceWorkflow:
151-
def __init__(self, input_items: list[TResponseInputItem] = None):
151+
def __init__(self, input_items: list[TResponseInputItem] | None = None):
152152
self.run_config = RunConfig()
153-
self.chat_history = []
153+
self.chat_history: list[str] = []
154154
self.current_agent: Agent[AirlineAgentContext] = init_agents()
155155
self.context = AirlineAgentContext()
156156
self.input_items = [] if input_items is None else input_items
157157

158158
@workflow.run
159-
async def run(self, input_items: list[TResponseInputItem] = None):
159+
async def run(self, input_items: list[TResponseInputItem] | None = None):
160160
await workflow.wait_condition(
161161
lambda: workflow.info().is_continue_as_new_suggested()
162162
and workflow.all_handlers_finished()

openai_agents/workflows/get_weather_activity.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
from dataclasses import dataclass
22

3-
from openai import BaseModel
43
from temporalio import activity
54

65

7-
class Weather(BaseModel):
8-
city: str
9-
temperature_range: str
10-
conditions: str
11-
12-
136
@dataclass
147
class Weather:
158
city: str

0 commit comments

Comments
 (0)