@@ -780,13 +780,15 @@ def test_custom_tracer_provider(self):
780
780
HTTPXClientInstrumentor ().uninstrument ()
781
781
782
782
def test_response_hook (self ):
783
- response_hook_key = "async_response_hook" if asyncio .iscoroutinefunction (self .response_hook ) else "response_hook"
784
- response_hook_kwargs = {
785
- response_hook_key : self .response_hook
786
- }
783
+ response_hook_key = (
784
+ "async_response_hook"
785
+ if asyncio .iscoroutinefunction (self .response_hook )
786
+ else "response_hook"
787
+ )
788
+ response_hook_kwargs = {response_hook_key : self .response_hook }
787
789
HTTPXClientInstrumentor ().instrument (
788
790
tracer_provider = self .tracer_provider ,
789
- ** response_hook_kwargs
791
+ ** response_hook_kwargs ,
790
792
)
791
793
client = self .create_client ()
792
794
result = self .perform_request (self .URL , client = client )
@@ -827,10 +829,12 @@ def test_response_hook_sync_async_kwargs(self):
827
829
HTTPXClientInstrumentor ().uninstrument ()
828
830
829
831
def test_request_hook (self ):
830
- request_hook_key = "async_request_hook" if asyncio .iscoroutinefunction (self .request_hook ) else "request_hook"
831
- request_hook_kwargs = {
832
- request_hook_key : self .request_hook
833
- }
832
+ request_hook_key = (
833
+ "async_request_hook"
834
+ if asyncio .iscoroutinefunction (self .request_hook )
835
+ else "request_hook"
836
+ )
837
+ request_hook_kwargs = {request_hook_key : self .request_hook }
834
838
HTTPXClientInstrumentor ().instrument (
835
839
tracer_provider = self .tracer_provider ,
836
840
** request_hook_kwargs ,
0 commit comments