From bc58e42a74a7c8dfb29dd685e0684d06c250d3f0 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 16 Jun 2023 21:08:35 -0400 Subject: [PATCH] Refine accounting related config loading routine doc strings --- piker/config.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/piker/config.py b/piker/config.py index 97989fe2..0220f3e6 100644 --- a/piker/config.py +++ b/piker/config.py @@ -309,9 +309,9 @@ def load_account( ) -> tuple[dict, Path]: ''' Load a accounting (with positions) file from - $PIKER_CONFIG_DIR/accounting/account...toml. + $CONFIG_DIR/accounting/account...toml - Where normally $PIKER_CONFIG_DIR = ~/.config/piker/ + Where normally $CONFIG_DIR = ~/.config/piker/ and we implicitly create a accounting subdir which should normally be linked to a git repo managed by the user B) @@ -366,7 +366,13 @@ def load_ledger( acctid: str, ) -> tuple[dict, Path]: + ''' + Load a ledger (TOML) file from user's config directory: + $CONFIG_DIR/accounting/ledgers/trades__.toml + Return its `dict`-content and file path. + + ''' ldir: Path = _config_dir / 'accounting' / 'ledgers' if not ldir.is_dir(): ldir.mkdir()