From 11d9a5203ef632a86f0236f0d02a899507f89490 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 9 Aug 2019 16:42:00 -0600 Subject: [PATCH] Adjusted docstrings --- scripts/wk/log.py | 3 ++- scripts/wk/std.py | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/wk/log.py b/scripts/wk/log.py index 61cfbdc2..91fa12b0 100644 --- a/scripts/wk/log.py +++ b/scripts/wk/log.py @@ -62,7 +62,8 @@ def start(config=None): def update_log_path(dest_dir, dest_name=''): """Copies current log file to new dir and updates the root logger. - NOTE: A timestamp and extension will be added to dest_name if provided.""" + NOTE: A timestamp and extension will be added to dest_name if provided. + """ root_logger = logging.getLogger() cur_handler = root_logger.handlers[0] dest = pathlib.Path(dest_dir) diff --git a/scripts/wk/std.py b/scripts/wk/std.py index 17a24690..b9f24c1c 100644 --- a/scripts/wk/std.py +++ b/scripts/wk/std.py @@ -129,7 +129,8 @@ def choice(choices, prompt='答えろ!'): """Choose an option from a provided list, returns str. Choices provided will be converted to uppercase and returned as such. - Similar to the commands choice (Windows) and select (Linux).""" + Similar to the commands choice (Windows) and select (Linux). + """ LOG.debug('choices: %s, prompt: %s', choices, prompt) answer = None choices = [str(c).upper()[:1] for c in choices] @@ -158,7 +159,8 @@ def clear_screen(): def get_log_filepath(): """Get the log filepath from the root logger, returns pathlib.Path obj. - NOTE: This will use the first handler baseFilename it finds (if any).""" + NOTE: This will use the first handler baseFilename it finds (if any). + """ log_filepath = None root_logger = logging.getLogger() @@ -346,7 +348,7 @@ def string_to_bytes(size, assume_binary=False): # Raise exception if string can't be parsed as a size if not tmp: - raise ValueError('invalid size string: {}'.format(size)) + raise ValueError('Invalid size string: {}'.format(size)) # Set scale if tmp.group('binary') or assume_binary: