@@ -284,8 +284,10 @@ def _merge_queryparams(
284284 return merged_queryparams
285285 return params
286286
287- def _build_auth (self , request : Request , auth : AuthTypes = None ) -> Auth :
288- auth = self .auth if auth is None else auth
287+ def _build_auth (
288+ self , request : Request , auth : typing .Union [AuthTypes , UnsetType ] = UNSET
289+ ) -> Auth :
290+ auth = self .auth if isinstance (auth , UnsetType ) else auth
289291
290292 if auth is not None :
291293 if isinstance (auth , tuple ):
@@ -607,7 +609,7 @@ def request(
607609 params : QueryParamTypes = None ,
608610 headers : HeaderTypes = None ,
609611 cookies : CookieTypes = None ,
610- auth : AuthTypes = None ,
612+ auth : typing . Union [ AuthTypes , UnsetType ] = UNSET ,
611613 allow_redirects : bool = True ,
612614 timeout : typing .Union [TimeoutTypes , UnsetType ] = UNSET ,
613615 ) -> Response :
@@ -646,7 +648,7 @@ def send(
646648 request : Request ,
647649 * ,
648650 stream : bool = False ,
649- auth : AuthTypes = None ,
651+ auth : typing . Union [ AuthTypes , UnsetType ] = UNSET ,
650652 allow_redirects : bool = True ,
651653 timeout : typing .Union [TimeoutTypes , UnsetType ] = UNSET ,
652654 ) -> Response :
@@ -792,7 +794,7 @@ def get(
792794 params : QueryParamTypes = None ,
793795 headers : HeaderTypes = None ,
794796 cookies : CookieTypes = None ,
795- auth : AuthTypes = None ,
797+ auth : typing . Union [ AuthTypes , UnsetType ] = UNSET ,
796798 allow_redirects : bool = True ,
797799 timeout : typing .Union [TimeoutTypes , UnsetType ] = UNSET ,
798800 ) -> Response :
@@ -819,7 +821,7 @@ def options(
819821 params : QueryParamTypes = None ,
820822 headers : HeaderTypes = None ,
821823 cookies : CookieTypes = None ,
822- auth : AuthTypes = None ,
824+ auth : typing . Union [ AuthTypes , UnsetType ] = UNSET ,
823825 allow_redirects : bool = True ,
824826 timeout : typing .Union [TimeoutTypes , UnsetType ] = UNSET ,
825827 ) -> Response :
@@ -846,7 +848,7 @@ def head(
846848 params : QueryParamTypes = None ,
847849 headers : HeaderTypes = None ,
848850 cookies : CookieTypes = None ,
849- auth : AuthTypes = None ,
851+ auth : typing . Union [ AuthTypes , UnsetType ] = UNSET ,
850852 allow_redirects : bool = False , # NOTE: Differs to usual default.
851853 timeout : typing .Union [TimeoutTypes , UnsetType ] = UNSET ,
852854 ) -> Response :
@@ -876,7 +878,7 @@ def post(
876878 params : QueryParamTypes = None ,
877879 headers : HeaderTypes = None ,
878880 cookies : CookieTypes = None ,
879- auth : AuthTypes = None ,
881+ auth : typing . Union [ AuthTypes , UnsetType ] = UNSET ,
880882 allow_redirects : bool = True ,
881883 timeout : typing .Union [TimeoutTypes , UnsetType ] = UNSET ,
882884 ) -> Response :
@@ -909,7 +911,7 @@ def put(
909911 params : QueryParamTypes = None ,
910912 headers : HeaderTypes = None ,
911913 cookies : CookieTypes = None ,
912- auth : AuthTypes = None ,
914+ auth : typing . Union [ AuthTypes , UnsetType ] = UNSET ,
913915 allow_redirects : bool = True ,
914916 timeout : typing .Union [TimeoutTypes , UnsetType ] = UNSET ,
915917 ) -> Response :
@@ -942,7 +944,7 @@ def patch(
942944 params : QueryParamTypes = None ,
943945 headers : HeaderTypes = None ,
944946 cookies : CookieTypes = None ,
945- auth : AuthTypes = None ,
947+ auth : typing . Union [ AuthTypes , UnsetType ] = UNSET ,
946948 allow_redirects : bool = True ,
947949 timeout : typing .Union [TimeoutTypes , UnsetType ] = UNSET ,
948950 ) -> Response :
@@ -972,7 +974,7 @@ def delete(
972974 params : QueryParamTypes = None ,
973975 headers : HeaderTypes = None ,
974976 cookies : CookieTypes = None ,
975- auth : AuthTypes = None ,
977+ auth : typing . Union [ AuthTypes , UnsetType ] = UNSET ,
976978 allow_redirects : bool = True ,
977979 timeout : typing .Union [TimeoutTypes , UnsetType ] = UNSET ,
978980 ) -> Response :
@@ -1208,7 +1210,7 @@ async def request(
12081210 params : QueryParamTypes = None ,
12091211 headers : HeaderTypes = None ,
12101212 cookies : CookieTypes = None ,
1211- auth : AuthTypes = None ,
1213+ auth : typing . Union [ AuthTypes , UnsetType ] = UNSET ,
12121214 allow_redirects : bool = True ,
12131215 timeout : typing .Union [TimeoutTypes , UnsetType ] = UNSET ,
12141216 ) -> Response :
@@ -1248,7 +1250,7 @@ async def send(
12481250 request : Request ,
12491251 * ,
12501252 stream : bool = False ,
1251- auth : AuthTypes = None ,
1253+ auth : typing . Union [ AuthTypes , UnsetType ] = UNSET ,
12521254 allow_redirects : bool = True ,
12531255 timeout : typing .Union [TimeoutTypes , UnsetType ] = UNSET ,
12541256 ) -> Response :
@@ -1396,7 +1398,7 @@ async def get(
13961398 params : QueryParamTypes = None ,
13971399 headers : HeaderTypes = None ,
13981400 cookies : CookieTypes = None ,
1399- auth : AuthTypes = None ,
1401+ auth : typing . Union [ AuthTypes , UnsetType ] = UNSET ,
14001402 allow_redirects : bool = True ,
14011403 timeout : typing .Union [TimeoutTypes , UnsetType ] = UNSET ,
14021404 ) -> Response :
@@ -1423,7 +1425,7 @@ async def options(
14231425 params : QueryParamTypes = None ,
14241426 headers : HeaderTypes = None ,
14251427 cookies : CookieTypes = None ,
1426- auth : AuthTypes = None ,
1428+ auth : typing . Union [ AuthTypes , UnsetType ] = UNSET ,
14271429 allow_redirects : bool = True ,
14281430 timeout : typing .Union [TimeoutTypes , UnsetType ] = UNSET ,
14291431 ) -> Response :
@@ -1450,7 +1452,7 @@ async def head(
14501452 params : QueryParamTypes = None ,
14511453 headers : HeaderTypes = None ,
14521454 cookies : CookieTypes = None ,
1453- auth : AuthTypes = None ,
1455+ auth : typing . Union [ AuthTypes , UnsetType ] = UNSET ,
14541456 allow_redirects : bool = False , # NOTE: Differs to usual default.
14551457 timeout : typing .Union [TimeoutTypes , UnsetType ] = UNSET ,
14561458 ) -> Response :
@@ -1480,7 +1482,7 @@ async def post(
14801482 params : QueryParamTypes = None ,
14811483 headers : HeaderTypes = None ,
14821484 cookies : CookieTypes = None ,
1483- auth : AuthTypes = None ,
1485+ auth : typing . Union [ AuthTypes , UnsetType ] = UNSET ,
14841486 allow_redirects : bool = True ,
14851487 timeout : typing .Union [TimeoutTypes , UnsetType ] = UNSET ,
14861488 ) -> Response :
@@ -1513,7 +1515,7 @@ async def put(
15131515 params : QueryParamTypes = None ,
15141516 headers : HeaderTypes = None ,
15151517 cookies : CookieTypes = None ,
1516- auth : AuthTypes = None ,
1518+ auth : typing . Union [ AuthTypes , UnsetType ] = UNSET ,
15171519 allow_redirects : bool = True ,
15181520 timeout : typing .Union [TimeoutTypes , UnsetType ] = UNSET ,
15191521 ) -> Response :
@@ -1546,7 +1548,7 @@ async def patch(
15461548 params : QueryParamTypes = None ,
15471549 headers : HeaderTypes = None ,
15481550 cookies : CookieTypes = None ,
1549- auth : AuthTypes = None ,
1551+ auth : typing . Union [ AuthTypes , UnsetType ] = UNSET ,
15501552 allow_redirects : bool = True ,
15511553 timeout : typing .Union [TimeoutTypes , UnsetType ] = UNSET ,
15521554 ) -> Response :
@@ -1576,7 +1578,7 @@ async def delete(
15761578 params : QueryParamTypes = None ,
15771579 headers : HeaderTypes = None ,
15781580 cookies : CookieTypes = None ,
1579- auth : AuthTypes = None ,
1581+ auth : typing . Union [ AuthTypes , UnsetType ] = UNSET ,
15801582 allow_redirects : bool = True ,
15811583 timeout : typing .Union [TimeoutTypes , UnsetType ] = UNSET ,
15821584 ) -> Response :
0 commit comments