Skip to content

Commit 5779e8b

Browse files
committed
Disable the specific lint rule: noqa: F824
1 parent 169690d commit 5779e8b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

app/app_logic.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -109,20 +109,20 @@ async def process_text(user_input):
109109

110110
@router.post("/start_conversation")
111111
async def start_conversation():
112-
global continue_conversation
112+
global continue_conversation # noqa: F824
113113
continue_conversation = True
114114
conversation_thread = Thread(target=asyncio.run, args=(conversation_loop(),))
115115
conversation_thread.start()
116116
return {"message": "Conversation started"}
117117

118118
@router.post("/stop_conversation")
119119
async def stop_conversation():
120-
global continue_conversation
120+
global continue_conversation # noqa: F824
121121
continue_conversation = False
122122
return {"message": "Conversation stopped"}
123123

124124
async def conversation_loop():
125-
global continue_conversation
125+
global continue_conversation # noqa: F824
126126
while continue_conversation:
127127
user_input = await record_audio_and_transcribe()
128128
conversation_history.append({"role": "user", "content": user_input})

app/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ async def stop_enhanced_conversation_route():
182182

183183
@app.post("/clear_history")
184184
async def clear_history():
185-
global conversation_history
185+
global conversation_history # noqa: F824
186186
conversation_history.clear() # Clear the in-memory conversation history
187187
save_conversation_history(conversation_history) # Save the cleared state to the file
188188
return {"status": "cleared"}

app/shared.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# Functions to get and set shared state
2121
def get_current_character():
2222
"""Get the current character."""
23-
global current_character
23+
global current_character # noqa: F824
2424
return current_character
2525

2626
def set_current_character(character):
@@ -30,7 +30,7 @@ def set_current_character(character):
3030

3131
def is_conversation_active():
3232
"""Check if a conversation is active."""
33-
global conversation_active
33+
global conversation_active # noqa: F824
3434
return conversation_active
3535

3636
def set_conversation_active(active):

0 commit comments

Comments
 (0)