@@ -63,9 +63,9 @@ def __init__(
63
63
self ,
64
64
* ,
65
65
access_token : str | None = None ,
66
- client_id : str | None = os . environ . get ( "FINCH_CLIENT_ID" , None ) ,
67
- client_secret : str | None = os . environ . get ( "FINCH_CLIENT_SECRET" , None ) ,
68
- webhook_secret : str | None = os . environ . get ( "FINCH_WEBHOOK_SECRET" , None ) ,
66
+ client_id : str | None = None ,
67
+ client_secret : str | None = None ,
68
+ webhook_secret : str | None = None ,
69
69
base_url : Optional [str ] = None ,
70
70
timeout : Union [float , Timeout , None , NotGiven ] = NOT_GIVEN ,
71
71
max_retries : int = DEFAULT_MAX_RETRIES ,
@@ -96,12 +96,20 @@ def __init__(
96
96
- `client_secret` from `FINCH_CLIENT_SECRET`
97
97
- `webhook_secret` from `FINCH_WEBHOOK_SECRET`
98
98
"""
99
+ if access_token is None :
100
+ access_token = None
99
101
self .access_token = access_token
100
102
103
+ if client_id is None :
104
+ client_id = os .environ .get ("FINCH_CLIENT_ID" ) or None
101
105
self .client_id = client_id
102
106
107
+ if client_secret is None :
108
+ client_secret = os .environ .get ("FINCH_CLIENT_SECRET" ) or None
103
109
self .client_secret = client_secret
104
110
111
+ if webhook_secret is None :
112
+ webhook_secret = os .environ .get ("FINCH_WEBHOOK_SECRET" ) or None
105
113
self .webhook_secret = webhook_secret
106
114
107
115
if base_url is None :
@@ -352,9 +360,9 @@ def __init__(
352
360
self ,
353
361
* ,
354
362
access_token : str | None = None ,
355
- client_id : str | None = os . environ . get ( "FINCH_CLIENT_ID" , None ) ,
356
- client_secret : str | None = os . environ . get ( "FINCH_CLIENT_SECRET" , None ) ,
357
- webhook_secret : str | None = os . environ . get ( "FINCH_WEBHOOK_SECRET" , None ) ,
363
+ client_id : str | None = None ,
364
+ client_secret : str | None = None ,
365
+ webhook_secret : str | None = None ,
358
366
base_url : Optional [str ] = None ,
359
367
timeout : Union [float , Timeout , None , NotGiven ] = NOT_GIVEN ,
360
368
max_retries : int = DEFAULT_MAX_RETRIES ,
@@ -385,12 +393,20 @@ def __init__(
385
393
- `client_secret` from `FINCH_CLIENT_SECRET`
386
394
- `webhook_secret` from `FINCH_WEBHOOK_SECRET`
387
395
"""
396
+ if access_token is None :
397
+ access_token = None
388
398
self .access_token = access_token
389
399
400
+ if client_id is None :
401
+ client_id = os .environ .get ("FINCH_CLIENT_ID" ) or None
390
402
self .client_id = client_id
391
403
404
+ if client_secret is None :
405
+ client_secret = os .environ .get ("FINCH_CLIENT_SECRET" ) or None
392
406
self .client_secret = client_secret
393
407
408
+ if webhook_secret is None :
409
+ webhook_secret = os .environ .get ("FINCH_WEBHOOK_SECRET" ) or None
394
410
self .webhook_secret = webhook_secret
395
411
396
412
if base_url is None :
0 commit comments