From d1596b4cae5ee581606fb3db37907258a1ff1b83 Mon Sep 17 00:00:00 2001 From: nlsdfnbch <23okrs20+github@mykolab.com> Date: Wed, 11 Oct 2017 14:30:20 +0200 Subject: [PATCH] fix docstrings --- cryptop/cryptop.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cryptop/cryptop.py b/cryptop/cryptop.py index 3250280..30c2643 100644 --- a/cryptop/cryptop.py +++ b/cryptop/cryptop.py @@ -40,6 +40,7 @@ KEY_c = 99 def read_configuration(confpath): + """Read the configuration file at given path.""" # copy our default config file if not os.path.isfile(confpath): defaultconf = pkg_resources.resource_filename(__name__, 'config.ini') @@ -123,7 +124,7 @@ def write_scr(stdscr, wallet, y, x): if y >= 2: header = ' COIN{}PRICE{}HELD {}VAL{}HIGH {}LOW '.format(first_pad, second_pad, third_pad, first_pad, first_pad) stdscr.addnstr(1, 0, header, x, curses.color_pair(3)) - + total = 0 coinl = list(wallet.keys()) heldl = list(wallet.values()) @@ -161,7 +162,7 @@ def read_wallet(): def write_wallet(wallet): - ''' Reads the wallet data to its json file ''' + ''' Write wallet data to its json file ''' with open(DATAFILE, 'w') as f: json.dump(wallet, f) @@ -182,7 +183,7 @@ def get_string(stdscr, prompt): def add_coin(coin_amount, wallet): - ''' Remove a coin and its amount to the wallet ''' + ''' Add a coin and its amount to the wallet ''' coin_amount = coin_amount.upper() if not COIN_FORMAT.match(coin_amount): return wallet