Skip to content

Commit 5437c2e

Browse files
committed
update
1 parent 75d5735 commit 5437c2e

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

integration_tests/test_sse.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
import time
77
import concurrent.futures
88
from typing import List, Dict, Any
9-
from unittest.mock import patch
10-
import re
119

1210
import pytest
1311
import requests
@@ -317,7 +315,6 @@ def test_SSE_Message_formatter(self):
317315

318316
def test_sse_concurrent_connections(self):
319317
"""Test multiple concurrent SSE connections"""
320-
import concurrent.futures
321318

322319
def get_events():
323320
return get_sse_stream("/sse/basic")
@@ -759,8 +756,6 @@ def test_gen():
759756

760757
def test_sse_concurrent_generator_creation(self):
761758
"""Test creating multiple SSE responses concurrently"""
762-
import threading
763-
import time
764759

765760
responses = []
766761
errors = []
@@ -1149,7 +1144,6 @@ def test_sse_custom_status_code(self):
11491144

11501145
def test_sse_concurrent_requests(self):
11511146
"""Test multiple concurrent SSE requests"""
1152-
import concurrent.futures
11531147

11541148
def get_basic_sse():
11551149
content = get_SSE_Response_quickly("/sse/basic")

robyn/mcp.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ def _generate_schema_from_function(func: Callable) -> Dict[str, Any]:
3737

3838
# Try to infer type from annotation
3939
if param.annotation != inspect.Parameter.empty:
40-
if param.annotation == str:
40+
if param.annotation is str:
4141
param_schema["type"] = "string"
42-
elif param.annotation == int:
42+
elif param.annotation is int:
4343
param_schema["type"] = "integer"
44-
elif param.annotation == float:
44+
elif param.annotation is float:
4545
param_schema["type"] = "number"
46-
elif param.annotation == bool:
46+
elif param.annotation is bool:
4747
param_schema["type"] = "boolean"
4848
elif hasattr(param.annotation, "__origin__"):
4949
# Handle generic types like List, Dict, etc.

0 commit comments

Comments
 (0)