From c4492d260ad8ff67925ec4fa17ac81b1c7f81447 Mon Sep 17 00:00:00 2001 From: ines Date: Mon, 8 May 2017 01:05:24 +0200 Subject: [PATCH] Fix kwargs --- spacy/util.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spacy/util.py b/spacy/util.py index dd941bd43..c07d7fe32 100644 --- a/spacy/util.py +++ b/spacy/util.py @@ -189,12 +189,14 @@ def print_markdown(data, title=None): print('\n{}\n'.format('\n'.join(markdown))) -def prints(*texts, title=None, exits=False): +def prints(*texts, **kwargs title=None, exits=False): """ Print formatted message. Each positional argument is rendered as newline- separated paragraph. An optional highlighted title is printed above the text (using ANSI escape sequences manually to avoid unnecessary dependency). """ + exits = kwargs.get('exits', False) + title = kwargs.get('title', None) title = '\033[93m{}\033[0m\n'.format(_wrap(title)) if title else '' message = '\n\n'.join([_wrap(text) for text in texts]) print('\n{}{}\n'.format(title, message))