@@ -60,10 +60,21 @@ def with_user_agent_extra(key: str, value: str):
6060class Config :
6161 host : str = ConfigAttribute (env = "DATABRICKS_HOST" )
6262 account_id : str = ConfigAttribute (env = "DATABRICKS_ACCOUNT_ID" )
63+
64+ # PAT token.
6365 token : str = ConfigAttribute (env = "DATABRICKS_TOKEN" , auth = "pat" , sensitive = True )
66+
67+ # Audience for OIDC ID token source accepting an audience as a parameter.
68+ # For example, the GitHub action ID token source.
6469 token_audience : str = ConfigAttribute (env = "DATABRICKS_TOKEN_AUDIENCE" , auth = "github-oidc" )
70+
71+ # Environment variable for OIDC token.
72+ oidc_token_env : str = ConfigAttribute (env = "DATABRICKS_OIDC_TOKEN_ENV" , auth = "env-oidc" )
73+ oidc_token_filepath : str = ConfigAttribute (env = "DATABRICKS_OIDC_TOKEN_FILE" , auth = "file-oidc" )
74+
6575 username : str = ConfigAttribute (env = "DATABRICKS_USERNAME" , auth = "basic" )
6676 password : str = ConfigAttribute (env = "DATABRICKS_PASSWORD" , auth = "basic" , sensitive = True )
77+
6778 client_id : str = ConfigAttribute (env = "DATABRICKS_CLIENT_ID" , auth = "oauth" )
6879 client_secret : str = ConfigAttribute (env = "DATABRICKS_CLIENT_SECRET" , auth = "oauth" , sensitive = True )
6980 profile : str = ConfigAttribute (env = "DATABRICKS_CONFIG_PROFILE" )
@@ -194,7 +205,7 @@ def oauth_token(self) -> Token:
194205 def wrap_debug_info (self , message : str ) -> str :
195206 debug_string = self .debug_string ()
196207 if debug_string :
197- message = f' { message .rstrip ("." )} . { debug_string } '
208+ message = f" { message .rstrip ('.' )} . { debug_string } "
198209 return message
199210
200211 @staticmethod
@@ -337,9 +348,9 @@ def debug_string(self) -> str:
337348 safe = "***" if attr .sensitive else f"{ value } "
338349 attrs_used .append (f"{ attr .name } ={ safe } " )
339350 if attrs_used :
340- buf .append (f' Config: { ", " .join (attrs_used )} ' )
351+ buf .append (f" Config: { ', ' .join (attrs_used )} " )
341352 if envs_used :
342- buf .append (f' Env: { ", " .join (envs_used )} ' )
353+ buf .append (f" Env: { ', ' .join (envs_used )} " )
343354 return ". " .join (buf )
344355
345356 def to_dict (self ) -> Dict [str , any ]:
@@ -481,7 +492,7 @@ def _known_file_config_loader(self):
481492 if profile not in profiles :
482493 raise ValueError (f"resolve: { config_path } has no { profile } profile configured" )
483494 raw_config = profiles [profile ]
484- logger .info (f' loading { profile } profile from { config_file } : { ", " .join (raw_config .keys ())} ' )
495+ logger .info (f" loading { profile } profile from { config_file } : { ', ' .join (raw_config .keys ())} " )
485496 for k , v in raw_config .items ():
486497 if k in self ._inner :
487498 # don't overwrite a value previously set
0 commit comments