@@ -294,9 +294,7 @@ def default_headers(self) -> dict[str, str | Omit]:
294294
295295 @override
296296 def _validate_headers (self , headers : Headers , custom_headers : Headers ) -> None :
297- if (self .api_key or self .agent_key or self .inference_key ) and headers .get (
298- "Authorization"
299- ):
297+ if (self .api_key or self .agent_key or self .inference_key ) and headers .get ("Authorization" ):
300298 return
301299 if isinstance (custom_headers .get ("Authorization" ), Omit ):
302300 return
@@ -326,14 +324,10 @@ def copy(
326324 Create a new client instance re-using the same options given to the current client with optional overriding.
327325 """
328326 if default_headers is not None and set_default_headers is not None :
329- raise ValueError (
330- "The `default_headers` and `set_default_headers` arguments are mutually exclusive"
331- )
327+ raise ValueError ("The `default_headers` and `set_default_headers` arguments are mutually exclusive" )
332328
333329 if default_query is not None and set_default_query is not None :
334- raise ValueError (
335- "The `default_query` and `set_default_query` arguments are mutually exclusive"
336- )
330+ raise ValueError ("The `default_query` and `set_default_query` arguments are mutually exclusive" )
337331
338332 headers = self ._custom_headers
339333 if default_headers is not None :
@@ -380,14 +374,10 @@ def _make_status_error(
380374 return _exceptions .BadRequestError (err_msg , response = response , body = body )
381375
382376 if response .status_code == 401 :
383- return _exceptions .AuthenticationError (
384- err_msg , response = response , body = body
385- )
377+ return _exceptions .AuthenticationError (err_msg , response = response , body = body )
386378
387379 if response .status_code == 403 :
388- return _exceptions .PermissionDeniedError (
389- err_msg , response = response , body = body
390- )
380+ return _exceptions .PermissionDeniedError (err_msg , response = response , body = body )
391381
392382 if response .status_code == 404 :
393383 return _exceptions .NotFoundError (err_msg , response = response , body = body )
@@ -396,17 +386,13 @@ def _make_status_error(
396386 return _exceptions .ConflictError (err_msg , response = response , body = body )
397387
398388 if response .status_code == 422 :
399- return _exceptions .UnprocessableEntityError (
400- err_msg , response = response , body = body
401- )
389+ return _exceptions .UnprocessableEntityError (err_msg , response = response , body = body )
402390
403391 if response .status_code == 429 :
404392 return _exceptions .RateLimitError (err_msg , response = response , body = body )
405393
406394 if response .status_code >= 500 :
407- return _exceptions .InternalServerError (
408- err_msg , response = response , body = body
409- )
395+ return _exceptions .InternalServerError (err_msg , response = response , body = body )
410396 return APIStatusError (err_msg , response = response , body = body )
411397
412398
@@ -618,9 +604,7 @@ def default_headers(self) -> dict[str, str | Omit]:
618604
619605 @override
620606 def _validate_headers (self , headers : Headers , custom_headers : Headers ) -> None :
621- if (self .api_key or self .agent_key or self .inference_key ) and headers .get (
622- "Authorization"
623- ):
607+ if (self .api_key or self .agent_key or self .inference_key ) and headers .get ("Authorization" ):
624608 return
625609 if isinstance (custom_headers .get ("Authorization" ), Omit ):
626610 return
@@ -650,14 +634,10 @@ def copy(
650634 Create a new client instance re-using the same options given to the current client with optional overriding.
651635 """
652636 if default_headers is not None and set_default_headers is not None :
653- raise ValueError (
654- "The `default_headers` and `set_default_headers` arguments are mutually exclusive"
655- )
637+ raise ValueError ("The `default_headers` and `set_default_headers` arguments are mutually exclusive" )
656638
657639 if default_query is not None and set_default_query is not None :
658- raise ValueError (
659- "The `default_query` and `set_default_query` arguments are mutually exclusive"
660- )
640+ raise ValueError ("The `default_query` and `set_default_query` arguments are mutually exclusive" )
661641
662642 headers = self ._custom_headers
663643 if default_headers is not None :
@@ -704,14 +684,10 @@ def _make_status_error(
704684 return _exceptions .BadRequestError (err_msg , response = response , body = body )
705685
706686 if response .status_code == 401 :
707- return _exceptions .AuthenticationError (
708- err_msg , response = response , body = body
709- )
687+ return _exceptions .AuthenticationError (err_msg , response = response , body = body )
710688
711689 if response .status_code == 403 :
712- return _exceptions .PermissionDeniedError (
713- err_msg , response = response , body = body
714- )
690+ return _exceptions .PermissionDeniedError (err_msg , response = response , body = body )
715691
716692 if response .status_code == 404 :
717693 return _exceptions .NotFoundError (err_msg , response = response , body = body )
@@ -720,17 +696,13 @@ def _make_status_error(
720696 return _exceptions .ConflictError (err_msg , response = response , body = body )
721697
722698 if response .status_code == 422 :
723- return _exceptions .UnprocessableEntityError (
724- err_msg , response = response , body = body
725- )
699+ return _exceptions .UnprocessableEntityError (err_msg , response = response , body = body )
726700
727701 if response .status_code == 429 :
728702 return _exceptions .RateLimitError (err_msg , response = response , body = body )
729703
730704 if response .status_code >= 500 :
731- return _exceptions .InternalServerError (
732- err_msg , response = response , body = body
733- )
705+ return _exceptions .InternalServerError (err_msg , response = response , body = body )
734706 return APIStatusError (err_msg , response = response , body = body )
735707
736708
@@ -1069,9 +1041,7 @@ def knowledge_bases(
10691041 AsyncKnowledgeBasesResourceWithStreamingResponse ,
10701042 )
10711043
1072- return AsyncKnowledgeBasesResourceWithStreamingResponse (
1073- self ._client .knowledge_bases
1074- )
1044+ return AsyncKnowledgeBasesResourceWithStreamingResponse (self ._client .knowledge_bases )
10751045
10761046 @cached_property
10771047 def inference (self ) -> inference .AsyncInferenceResourceWithStreamingResponse :
@@ -1121,9 +1091,7 @@ def load_balancers(
11211091 AsyncLoadBalancersResourceWithStreamingResponse ,
11221092 )
11231093
1124- return AsyncLoadBalancersResourceWithStreamingResponse (
1125- self ._client .load_balancers
1126- )
1094+ return AsyncLoadBalancersResourceWithStreamingResponse (self ._client .load_balancers )
11271095
11281096 @cached_property
11291097 def sizes (self ) -> sizes .AsyncSizesResourceWithStreamingResponse :
0 commit comments