File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -299,14 +299,10 @@ def default_headers(self) -> dict[str, str | Omit]:
299299
300300 @override
301301 def _validate_headers (self , headers : Headers , custom_headers : Headers ) -> None :
302- if self .pro_api_key and headers .get ("x-cg-pro-api-key" ):
303- return
304- if isinstance (custom_headers .get ("x-cg-pro-api-key" ), Omit ):
302+ if headers .get ("x-cg-pro-api-key" ) or isinstance (custom_headers .get ("x-cg-pro-api-key" ), Omit ):
305303 return
306304
307- if self .demo_api_key and headers .get ("x-cg-demo-api-key" ):
308- return
309- if isinstance (custom_headers .get ("x-cg-demo-api-key" ), Omit ):
305+ if headers .get ("x-cg-demo-api-key" ) or isinstance (custom_headers .get ("x-cg-demo-api-key" ), Omit ):
310306 return
311307
312308 raise TypeError (
@@ -618,14 +614,10 @@ def default_headers(self) -> dict[str, str | Omit]:
618614
619615 @override
620616 def _validate_headers (self , headers : Headers , custom_headers : Headers ) -> None :
621- if self .pro_api_key and headers .get ("x-cg-pro-api-key" ):
622- return
623- if isinstance (custom_headers .get ("x-cg-pro-api-key" ), Omit ):
617+ if headers .get ("x-cg-pro-api-key" ) or isinstance (custom_headers .get ("x-cg-pro-api-key" ), Omit ):
624618 return
625619
626- if self .demo_api_key and headers .get ("x-cg-demo-api-key" ):
627- return
628- if isinstance (custom_headers .get ("x-cg-demo-api-key" ), Omit ):
620+ if headers .get ("x-cg-demo-api-key" ) or isinstance (custom_headers .get ("x-cg-demo-api-key" ), Omit ):
629621 return
630622
631623 raise TypeError (
You can’t perform that action at this time.
0 commit comments