File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -167,9 +167,7 @@ def default_headers(self) -> dict[str, str | Omit]:
167167
168168 @override
169169 def _validate_headers (self , headers : Headers , custom_headers : Headers ) -> None :
170- if self .api_key and headers .get ("Authorization" ):
171- return
172- if isinstance (custom_headers .get ("Authorization" ), Omit ):
170+ if headers .get ("Authorization" ) or isinstance (custom_headers .get ("Authorization" ), Omit ):
173171 return
174172
175173 raise TypeError (
@@ -374,9 +372,7 @@ def default_headers(self) -> dict[str, str | Omit]:
374372
375373 @override
376374 def _validate_headers (self , headers : Headers , custom_headers : Headers ) -> None :
377- if self .api_key and headers .get ("Authorization" ):
378- return
379- if isinstance (custom_headers .get ("Authorization" ), Omit ):
375+ if headers .get ("Authorization" ) or isinstance (custom_headers .get ("Authorization" ), Omit ):
380376 return
381377
382378 raise TypeError (
You can’t perform that action at this time.
0 commit comments