File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1919from ynamazon .settings import ConfigFile , SecretApiKey , SecretBudgetId , get_settings
2020from ynamazon .ynab_transactions import (
2121 TempYnabTransaction ,
22+ get_default_ynab_config ,
2223 get_ynab_transactions ,
2324 update_ynab_transaction ,
2425)
@@ -227,15 +228,14 @@ def new_ynamazon( # noqa: C901
227228 }
228229 )
229230
230- ynab_config = Configuration (
231- access_token = cli_settings .ynab_api_key .get_secret_value ()
232- )
231+ ynab_config = get_default_ynab_config ()
233232
234233 try :
235234 ynab_trans , amazon_with_memo_payee = get_ynab_transactions (
236235 configuration = ynab_config ,
237- budget_id = cli_settings .ynab_budget_id . get_secret_value (),
236+ budget_id = cli_settings .get_secret_value ("ynab_budget_id" ),
238237 )
238+ console .print (f"[bold green]Found { len (ynab_trans )} transactions.[/]" )
239239 except YnabSetupError as e :
240240 console .print (f"[bold red]get_settings() error: { e } [/]" )
241241 console .print (
Original file line number Diff line number Diff line change 1515
1616from .exceptions import YnabSetupError
1717from .settings import get_settings
18- from .ynab_transactions import default_configuration as ynab_configuration
1918from .ynab_transactions import (
19+ get_default_ynab_config ,
2020 get_ynab_transactions ,
2121 markdown_formatted_link ,
2222 markdown_formatted_title ,
@@ -113,7 +113,7 @@ def process_transactions(
113113) -> None :
114114 """Match YNAB transactions to Amazon Transactions and optionally update YNAB Memos."""
115115 amazon_config = amazon_config or AmazonConfig ()
116- ynab_config = ynab_config or ynab_configuration
116+ ynab_config = ynab_config or get_default_ynab_config ()
117117 budget_id = budget_id or get_settings ().ynab_budget_id .get_secret_value ()
118118
119119 console = Console ()
You can’t perform that action at this time.
0 commit comments