reformating code, and adding specific rules for examples so it shows up correctly on readthedocs, by default.

This commit is contained in:
Romain Dorgueil
2017-05-01 15:21:26 +02:00
parent 474999a87e
commit 0feccb1aa9
13 changed files with 70 additions and 43 deletions

View File

@ -21,8 +21,9 @@ def print_error(exc, trace, context=None, prefix=''):
print(
Style.BRIGHT,
Fore.RED,
'\U0001F4A3 {}{}{}'.format((prefix + ': ') if prefix else '', type(exc).__name__,
' in {!r}'.format(context) if context else ''),
'\U0001F4A3 {}{}{}'.format(
(prefix + ': ') if prefix else '', type(exc).__name__, ' in {!r}'.format(context) if context else ''
),
Style.RESET_ALL,
sep='',
file=sys.stderr,