44# ------------------------------------
55from __future__ import annotations
66
7- from typing import Dict , List , Optional
7+ from typing import Optional
88
99import httpx
1010from kiota_abstractions .request_option import RequestOption
@@ -27,7 +27,7 @@ def create_with_default_middleware( # type: ignore
2727 api_version : APIVersion = APIVersion .v1 ,
2828 client : Optional [httpx .AsyncClient ] = None ,
2929 host : NationalClouds = NationalClouds .Global ,
30- options : Optional [Dict [str , RequestOption ]] = None
30+ options : Optional [dict [str , RequestOption ]] = None
3131 ) -> httpx .AsyncClient :
3232 """Constructs native HTTP AsyncClient(httpx.AsyncClient) instances configured with
3333 a custom transport loaded with a default pipeline of middleware.
@@ -39,8 +39,8 @@ def create_with_default_middleware( # type: ignore
3939 Defaults to KiotaClientFactory.get_default_client().
4040 host (NationalClouds): The national clound endpoint to be used.
4141 Defaults to NationalClouds.Global.
42- options (Optional[Dict [str, RequestOption]]): The request options to use when
43- instantiating default middleware. Defaults to Dict [str, RequestOption]=None.
42+ options (Optional[dict [str, RequestOption]]): The request options to use when
43+ instantiating default middleware. Defaults to dict [str, RequestOption]=None.
4444
4545 Returns:
4646 httpx.AsyncClient: An instance of the AsyncClient object
@@ -56,15 +56,15 @@ def create_with_default_middleware( # type: ignore
5656 @staticmethod
5757 def create_with_custom_middleware ( # type: ignore
5858 # Breaking change to remove Kiota client factory as base class
59- middleware : Optional [List [BaseMiddleware ]],
59+ middleware : Optional [list [BaseMiddleware ]],
6060 api_version : APIVersion = APIVersion .v1 ,
6161 client : Optional [httpx .AsyncClient ] = None ,
6262 host : NationalClouds = NationalClouds .Global ,
6363 ) -> httpx .AsyncClient :
6464 """Applies a custom middleware chain to the HTTP Client
6565
6666 Args:
67- middleware(List [BaseMiddleware]): Custom middleware list that will be used to create
67+ middleware(list [BaseMiddleware]): Custom middleware list that will be used to create
6868 a middleware pipeline. The middleware should be arranged in the order in which they will
6969 modify the request.
7070 api_version (APIVersion): The Graph API version to be used.
@@ -87,7 +87,7 @@ def _get_base_url(host: str, api_version: APIVersion) -> str:
8787
8888 @staticmethod
8989 def _get_telemetry_handler (
90- options : Optional [Dict [str , RequestOption ]]
90+ options : Optional [dict [str , RequestOption ]]
9191 ) -> GraphTelemetryHandler :
9292 """Helper method to get the graph telemetry handler instantiated with appropriate
9393 options"""
@@ -102,7 +102,7 @@ def _get_telemetry_handler(
102102
103103 @staticmethod
104104 def _load_middleware_to_client (
105- client : httpx .AsyncClient , middleware : Optional [List [BaseMiddleware ]]
105+ client : httpx .AsyncClient , middleware : Optional [list [BaseMiddleware ]]
106106 ) -> httpx .AsyncClient :
107107 current_transport = client ._transport
108108 client ._transport = GraphClientFactory ._replace_transport_with_custom_graph_transport (
@@ -123,7 +123,7 @@ def _load_middleware_to_client(
123123
124124 @staticmethod
125125 def _replace_transport_with_custom_graph_transport (
126- current_transport : httpx .AsyncBaseTransport , middleware : Optional [List [BaseMiddleware ]]
126+ current_transport : httpx .AsyncBaseTransport , middleware : Optional [list [BaseMiddleware ]]
127127 ) -> AsyncGraphTransport :
128128 middleware_pipeline = KiotaClientFactory .create_middleware_pipeline (
129129 middleware , current_transport
0 commit comments