comparison hgext/convert/common.py @ 48946:642e31cb55f0

py3: use class X: instead of class X(object): The inheritance from object is implied in Python 3. So this should be equivalent. This change was generated via an automated search and replace. So there may have been some accidental changes. Differential Revision: https://phab.mercurial-scm.org/D12352
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 21 Feb 2022 13:08:28 -0700
parents fd5b8e696b75
children ef5f5f1cbd90
comparison
equal deleted inserted replaced
48945:55d132525155 48946:642e31cb55f0
32 if d is None: 32 if d is None:
33 return 33 return
34 return d.encode('latin1') 34 return d.encode('latin1')
35 35
36 36
37 class _shlexpy3proxy(object): 37 class _shlexpy3proxy:
38 def __init__(self, l): 38 def __init__(self, l):
39 self._l = l 39 self._l = l
40 40
41 def __iter__(self): 41 def __iter__(self):
42 return (_encodeornone(v) for v in self._l) 42 return (_encodeornone(v) for v in self._l)
125 125
126 126
127 SKIPREV = b'SKIP' 127 SKIPREV = b'SKIP'
128 128
129 129
130 class commit(object): 130 class commit:
131 def __init__( 131 def __init__(
132 self, 132 self,
133 author, 133 author,
134 date, 134 date,
135 desc, 135 desc,
155 self.saverev = saverev 155 self.saverev = saverev
156 self.phase = phase 156 self.phase = phase
157 self.ctx = ctx # for hg to hg conversions 157 self.ctx = ctx # for hg to hg conversions
158 158
159 159
160 class converter_source(object): 160 class converter_source:
161 """Conversion source interface""" 161 """Conversion source interface"""
162 162
163 def __init__(self, ui, repotype, path=None, revs=None): 163 def __init__(self, ui, repotype, path=None, revs=None):
164 """Initialize conversion source (or raise NoRepo("message") 164 """Initialize conversion source (or raise NoRepo("message")
165 exception if path is not a valid repository)""" 165 exception if path is not a valid repository)"""
305 format. 305 format.
306 """ 306 """
307 return True 307 return True
308 308
309 309
310 class converter_sink(object): 310 class converter_sink:
311 """Conversion sink (target) interface""" 311 """Conversion sink (target) interface"""
312 312
313 def __init__(self, ui, repotype, path): 313 def __init__(self, ui, repotype, path):
314 """Initialize conversion sink (or raise NoRepo("message") 314 """Initialize conversion sink (or raise NoRepo("message")
315 exception if path is not a valid repository) 315 exception if path is not a valid repository)
401 for general use. Returns True if the sink contains rev, aborts on some 401 for general use. Returns True if the sink contains rev, aborts on some
402 special cases.""" 402 special cases."""
403 raise NotImplementedError 403 raise NotImplementedError
404 404
405 405
406 class commandline(object): 406 class commandline:
407 def __init__(self, ui, command): 407 def __init__(self, ui, command):
408 self.ui = ui 408 self.ui = ui
409 self.command = command 409 self.command = command
410 410
411 def prerun(self): 411 def prerun(self):