comparison mercurial/formatter.py @ 51762:ca7bde5dbafb

black: format the codebase with 23.3.0 The CI has moved to 23.3.0, which is the last version that supports 3.7 at runtime, so we should honor this change. # skip-blame mass-reformating only
author Rapha?l Gom?s <rgomes@octobus.net>
date Thu, 18 Jul 2024 12:36:12 +0200
parents 7f0cb9ee0534
children 278af66e6595
comparison
equal deleted inserted replaced
51761:b0a4de6c14f8 51762:ca7bde5dbafb
174 '''convert iterable to appropriate list format''' 174 '''convert iterable to appropriate list format'''
175 return list(data) 175 return list(data)
176 176
177 177
178 class baseformatter: 178 class baseformatter:
179
180 # set to True if the formater output a strict format that does not support 179 # set to True if the formater output a strict format that does not support
181 # arbitrary output in the stream. 180 # arbitrary output in the stream.
182 strict_format = False 181 strict_format = False
183 182
184 def __init__(self, ui, topic, opts, converter): 183 def __init__(self, ui, topic, opts, converter):
419 baseformatter.end(self) 418 baseformatter.end(self)
420 self._out.write(cborutil.BREAK) 419 self._out.write(cborutil.BREAK)
421 420
422 421
423 class jsonformatter(baseformatter): 422 class jsonformatter(baseformatter):
424
425 strict_format = True 423 strict_format = True
426 424
427 def __init__(self, ui, out, topic, opts): 425 def __init__(self, ui, out, topic, opts):
428 baseformatter.__init__(self, ui, topic, opts, _nullconverter) 426 baseformatter.__init__(self, ui, topic, opts, _nullconverter)
429 self._out = out 427 self._out = out