Adjusted docstrings

This commit is contained in:
2Shirt 2019-08-09 16:42:00 -06:00
parent cf5b546183
commit 11d9a5203e
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
2 changed files with 7 additions and 4 deletions

View file

@ -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)

View file

@ -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: