Mercurial > public > mercurial-scm > hg
comparison mercurial/revlog.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 | ceafb0f81250 |
children | 5b65721a75eb |
comparison
equal
deleted
inserted
replaced
48945:55d132525155 | 48946:642e31cb55f0 |
---|---|
169 ) | 169 ) |
170 | 170 |
171 | 171 |
172 @interfaceutil.implementer(repository.irevisiondelta) | 172 @interfaceutil.implementer(repository.irevisiondelta) |
173 @attr.s(slots=True) | 173 @attr.s(slots=True) |
174 class revlogrevisiondelta(object): | 174 class revlogrevisiondelta: |
175 node = attr.ib() | 175 node = attr.ib() |
176 p1node = attr.ib() | 176 p1node = attr.ib() |
177 p2node = attr.ib() | 177 p2node = attr.ib() |
178 basenode = attr.ib() | 178 basenode = attr.ib() |
179 flags = attr.ib() | 179 flags = attr.ib() |
185 linknode = attr.ib(default=None) | 185 linknode = attr.ib(default=None) |
186 | 186 |
187 | 187 |
188 @interfaceutil.implementer(repository.iverifyproblem) | 188 @interfaceutil.implementer(repository.iverifyproblem) |
189 @attr.s(frozen=True) | 189 @attr.s(frozen=True) |
190 class revlogproblem(object): | 190 class revlogproblem: |
191 warning = attr.ib(default=None) | 191 warning = attr.ib(default=None) |
192 error = attr.ib(default=None) | 192 error = attr.ib(default=None) |
193 node = attr.ib(default=None) | 193 node = attr.ib(default=None) |
194 | 194 |
195 | 195 |
235 b'cannot read from revlog %s;' | 235 b'cannot read from revlog %s;' |
236 b' expected %d bytes from offset %d, data size is %d' | 236 b' expected %d bytes from offset %d, data size is %d' |
237 ) | 237 ) |
238 | 238 |
239 | 239 |
240 class revlog(object): | 240 class revlog: |
241 """ | 241 """ |
242 the underlying revision storage object | 242 the underlying revision storage object |
243 | 243 |
244 A revlog consists of two parts, an index and the revision data. | 244 A revlog consists of two parts, an index and the revision data. |
245 | 245 |
1040 | 1040 |
1041 common = [self.rev(n) for n in common] | 1041 common = [self.rev(n) for n in common] |
1042 heads = [self.rev(n) for n in heads] | 1042 heads = [self.rev(n) for n in heads] |
1043 | 1043 |
1044 # we want the ancestors, but inclusive | 1044 # we want the ancestors, but inclusive |
1045 class lazyset(object): | 1045 class lazyset: |
1046 def __init__(self, lazyvalues): | 1046 def __init__(self, lazyvalues): |
1047 self.addedvalues = set() | 1047 self.addedvalues = set() |
1048 self.lazyvalues = lazyvalues | 1048 self.lazyvalues = lazyvalues |
1049 | 1049 |
1050 def __contains__(self, value): | 1050 def __contains__(self, value): |