Skip to content

Commit

Permalink
python-jsonschema#708 - satisfy Python2 unicode tests - attempt 1
Browse files Browse the repository at this point in the history
  • Loading branch information
sloanlance committed Jul 29, 2020
1 parent bff4f00 commit e0719d5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jsonschema/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ def _json_formatter(cls, x):
return json.dumps(x, separators=(',\n', ': '), sort_keys=True)

def _simple_msg(self, path, type, header=False):
begin_end_chars = '╒╕' if header is True else '══'
return '{}══[{}]═══({})'.format(begin_end_chars[0], type, path) \
.ljust(self._WIDTH - 1, '═') + begin_end_chars[1]
begin_end_chars = u'╒╕' if header is True else u'══'
return u'{}══[{}]═══({})'.format(begin_end_chars[0], type, path) \
.ljust(self._WIDTH - 1, u'═') + begin_end_chars[1]

def _error_msg(self, path, type, body):
HEADER = self._simple_msg(path, type, header=True)
FOOTER = '└' + '─' * (self._WIDTH - 2) + '┘'
FOOTER = u'└' + u'─' * (self._WIDTH - 2) + u'┘'

return '\n'.join((HEADER, str(body), FOOTER, '\n'))

Expand Down

0 comments on commit e0719d5

Please sign in to comment.