@@ -172,7 +172,7 @@ def __init__(
172
172
* ,
173
173
scopes : list [str ] | None = None ,
174
174
tenant_id : str | None = None ,
175
- credentials : Any | None = None ,
175
+ credential : Any | None = None ,
176
176
_storage_account : str | None = None ,
177
177
) -> None :
178
178
"""
@@ -186,7 +186,7 @@ def __init__(
186
186
Scopes to pass to `get_token`
187
187
tenant_id
188
188
Azure tenant ID.
189
- credentials
189
+ credential
190
190
Optionally pass an instantiated Azure credential class to use (e.g.
191
191
`azure.identity.DefaultAzureCredential`). The credential class must
192
192
have a `get_token()` method.
@@ -199,21 +199,21 @@ def __init__(
199
199
scopes if scopes is not None else ["https://storage.azure.com/.default" ]
200
200
)
201
201
self .tenant_id = tenant_id
202
- self .credentials = credentials
202
+ self .credential = credential
203
203
204
- if credentials is not None :
205
- # If the user passes a credentials class, we just need to ensure it
204
+ if credential is not None :
205
+ # If the user passes a credential class, we just need to ensure it
206
206
# has a `get_token()` method.
207
- if not hasattr (credentials , "get_token" ):
207
+ if not hasattr (credential , "get_token" ):
208
208
msg = (
209
- f"the provided `credentials ` object { credentials !r} does "
209
+ f"the provided `credential ` object { credential !r} does "
210
210
"not have a `get_token()` method."
211
211
)
212
212
raise ValueError (msg )
213
213
214
214
# We don't need the module if we are permitted and able to retrieve the
215
215
# account key from the Azure CLI.
216
- elif self ._try_get_azure_storage_account_credentials_if_permitted () is None :
216
+ elif self ._try_get_azure_storage_account_credential_if_permitted () is None :
217
217
self ._ensure_module_availability ()
218
218
219
219
if verbose ():
@@ -227,13 +227,13 @@ def __init__(
227
227
def __call__ (self ) -> CredentialProviderFunctionReturn :
228
228
"""Fetch the credentials."""
229
229
if (
230
- v := self ._try_get_azure_storage_account_credentials_if_permitted ()
230
+ v := self ._try_get_azure_storage_account_credential_if_permitted ()
231
231
) is not None :
232
232
return v
233
233
234
234
# Done like this to bypass mypy, we don't have stubs for azure.identity
235
235
credential = (
236
- self .credentials
236
+ self .credential
237
237
or importlib .import_module ("azure.identity" ).__dict__ [
238
238
"DefaultAzureCredential"
239
239
]()
@@ -244,7 +244,7 @@ def __call__(self) -> CredentialProviderFunctionReturn:
244
244
"bearer_token" : token .token ,
245
245
}, token .expires_on
246
246
247
- def _try_get_azure_storage_account_credentials_if_permitted (
247
+ def _try_get_azure_storage_account_credential_if_permitted (
248
248
self ,
249
249
) -> CredentialProviderFunctionReturn | None :
250
250
POLARS_AUTO_USE_AZURE_STORAGE_ACCOUNT_KEY = os .getenv (
0 commit comments