Skip to content

Commit bef3e36

Browse files
committed
cleanup
1 parent 5a55b6a commit bef3e36

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

sentry_sdk/integrations/openai.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def _calculate_token_usage(
152152

153153

154154
def _new_chat_completion_common(f, *args, **kwargs):
155-
# type: (Any, *Any, **Any) -> Any
155+
# type: (Any, Any, Any) -> Any
156156
integration = sentry_sdk.get_client().get_integration(OpenAIIntegration)
157157
if integration is None:
158158
return f(*args, **kwargs)
@@ -282,7 +282,7 @@ async def new_iterator_async():
282282
def _wrap_chat_completion_create(f):
283283
# type: (Callable[..., Any]) -> Callable[..., Any]
284284
def _execute_sync(f, *args, **kwargs):
285-
# type: (Any, *Any, **Any) -> Any
285+
# type: (Any, Any, Any) -> Any
286286
gen = _new_chat_completion_common(f, *args, **kwargs)
287287

288288
try:
@@ -303,7 +303,7 @@ def _execute_sync(f, *args, **kwargs):
303303

304304
@wraps(f)
305305
def _sentry_patched_create_sync(*args, **kwargs):
306-
# type: (*Any, **Any) -> Any
306+
# type: (Any, Any) -> Any
307307
integration = sentry_sdk.get_client().get_integration(OpenAIIntegration)
308308
if integration is None or "messages" not in kwargs:
309309
# no "messages" means invalid call (in all versions of openai), let it return error
@@ -317,7 +317,7 @@ def _sentry_patched_create_sync(*args, **kwargs):
317317
def _wrap_async_chat_completion_create(f):
318318
# type: (Callable[..., Any]) -> Callable[..., Any]
319319
async def _execute_async(f, *args, **kwargs):
320-
# type: (Any, *Any, **Any) -> Any
320+
# type: (Any, Any, Any) -> Any
321321
gen = _new_chat_completion_common(f, *args, **kwargs)
322322

323323
try:
@@ -338,7 +338,7 @@ async def _execute_async(f, *args, **kwargs):
338338

339339
@wraps(f)
340340
async def _sentry_patched_create_async(*args, **kwargs):
341-
# type: (*Any, **Any) -> Any
341+
# type: (Any, Any) -> Any
342342
integration = sentry_sdk.get_client().get_integration(OpenAIIntegration)
343343
if integration is None or "messages" not in kwargs:
344344
# no "messages" means invalid call (in all versions of openai), let it return error
@@ -350,7 +350,7 @@ async def _sentry_patched_create_async(*args, **kwargs):
350350

351351

352352
def _new_embeddings_create_common(f, *args, **kwargs):
353-
# type: (Any, *Any, **Any) -> Any
353+
# type: (Any, Any, Any) -> Any
354354
integration = sentry_sdk.get_client().get_integration(OpenAIIntegration)
355355
if integration is None:
356356
return f(*args, **kwargs)
@@ -409,7 +409,7 @@ def _new_embeddings_create_common(f, *args, **kwargs):
409409
def _wrap_embeddings_create(f):
410410
# type: (Any) -> Any
411411
def _execute_sync(f, *args, **kwargs):
412-
# type: (Any, *Any, **Any) -> Any
412+
# type: (Any, Any, Any) -> Any
413413
gen = _new_embeddings_create_common(f, *args, **kwargs)
414414

415415
try:
@@ -430,7 +430,7 @@ def _execute_sync(f, *args, **kwargs):
430430

431431
@wraps(f)
432432
def _sentry_patched_create_sync(*args, **kwargs):
433-
# type: (*Any, **Any) -> Any
433+
# type: (Any, Any) -> Any
434434
integration = sentry_sdk.get_client().get_integration(OpenAIIntegration)
435435
if integration is None:
436436
return f(*args, **kwargs)
@@ -443,7 +443,7 @@ def _sentry_patched_create_sync(*args, **kwargs):
443443
def _wrap_async_embeddings_create(f):
444444
# type: (Any) -> Any
445445
async def _execute_async(f, *args, **kwargs):
446-
# type: (Any, *Any, **Any) -> Any
446+
# type: (Any, Any, Any) -> Any
447447
gen = _new_embeddings_create_common(f, *args, **kwargs)
448448

449449
try:
@@ -464,7 +464,7 @@ async def _execute_async(f, *args, **kwargs):
464464

465465
@wraps(f)
466466
async def _sentry_patched_create_async(*args, **kwargs):
467-
# type: (*Any, **Any) -> Any
467+
# type: (Any, Any) -> Any
468468
integration = sentry_sdk.get_client().get_integration(OpenAIIntegration)
469469
if integration is None:
470470
return await f(*args, **kwargs)
@@ -475,7 +475,7 @@ async def _sentry_patched_create_async(*args, **kwargs):
475475

476476

477477
def _new_responses_create_common(f, *args, **kwargs):
478-
# type: (Any, *Any, **Any) -> Any
478+
# type: (Any, Any, Any) -> Any
479479
integration = sentry_sdk.get_client().get_integration(OpenAIIntegration)
480480
if integration is None:
481481
return f(*args, **kwargs)
@@ -517,7 +517,7 @@ def _new_responses_create_common(f, *args, **kwargs):
517517
def _wrap_responses_create(f):
518518
# type: (Any) -> Any
519519
def _execute_sync(f, *args, **kwargs):
520-
# type: (Any, *Any, **Any) -> Any
520+
# type: (Any, Any, Any) -> Any
521521
gen = _new_responses_create_common(f, *args, **kwargs)
522522

523523
try:
@@ -538,7 +538,7 @@ def _execute_sync(f, *args, **kwargs):
538538

539539
@wraps(f)
540540
def _sentry_patched_create_sync(*args, **kwargs):
541-
# type: (*Any, **Any) -> Any
541+
# type: (Any, Any) -> Any
542542
integration = sentry_sdk.get_client().get_integration(OpenAIIntegration)
543543
if integration is None:
544544
return f(*args, **kwargs)
@@ -551,7 +551,7 @@ def _sentry_patched_create_sync(*args, **kwargs):
551551
def _wrap_async_responses_create(f):
552552
# type: (Any) -> Any
553553
async def _execute_async(f, *args, **kwargs):
554-
# type: (Any, *Any, **Any) -> Any
554+
# type: (Any, Any, Any) -> Any
555555
gen = _new_responses_create_common(f, *args, **kwargs)
556556

557557
try:
@@ -572,7 +572,7 @@ async def _execute_async(f, *args, **kwargs):
572572

573573
@wraps(f)
574574
async def _sentry_patched_create_async(*args, **kwargs):
575-
# type: (*Any, **Any) -> Any
575+
# type: (Any, Any) -> Any
576576
integration = sentry_sdk.get_client().get_integration(OpenAIIntegration)
577577
if integration is None:
578578
return await f(*args, **kwargs)

0 commit comments

Comments
 (0)