# HG changeset patch # User Matt Harbison # Date 1729714764 14400 # Node ID 61557734c0ae271f2490624a208cfd1cd0e69fe5 # Parent 43602c675b4f3dffe92217c2386c0d57347ba120 revlog: drop the CamelCase name for `revlog.revlogrevisiondelta` These CamelCase names popped up this cycle because pytype was getting confused by the zope decorator, and so the decoration was decoupled from the class declaration. We're in the process of switching all of the zope interfaces to `typing.Protocol` classes, but we're up against the code freeze. It would be nice to use CamelCase for protocol classes (or classes in general), but let's reset to a consistent state and buy some more time to think about this. Since we're moving to Protocol classes and I disabled the interface tests back in ef7d85089952, I'm not bothering to re-add the decorator, and re-confuse pytype. But do place the interface next to the class, so that these places can be found with the `grep` when the time comes to subclass. diff -r 43602c675b4f -r 61557734c0ae hgext/remotefilelog/remotefilelog.py --- a/hgext/remotefilelog/remotefilelog.py Wed Oct 23 16:14:13 2024 +0200 +++ b/hgext/remotefilelog/remotefilelog.py Wed Oct 23 16:19:24 2024 -0400 @@ -302,7 +302,7 @@ deltamode=None, sidedata_helpers=None, debug_info=None, - ) -> Iterator[revlog.RevLogRevisionDelta]: + ) -> Iterator[revlog.revlogrevisiondelta]: # we don't use any of these parameters here del nodesorder, revisiondata, assumehaveparentrevisions, deltaprevious del deltamode diff -r 43602c675b4f -r 61557734c0ae mercurial/revlog.py --- a/mercurial/revlog.py Wed Oct 23 16:14:13 2024 +0200 +++ b/mercurial/revlog.py Wed Oct 23 16:19:24 2024 -0400 @@ -190,7 +190,7 @@ @attr.s(slots=True) -class RevLogRevisionDelta: +class revlogrevisiondelta: # (repository.irevisiondelta) node = attr.ib() p1node = attr.ib() p2node = attr.ib() @@ -204,14 +204,6 @@ linknode = attr.ib(default=None) -revlogrevisiondelta = interfaceutil.implementer(repository.irevisiondelta)( - RevLogRevisionDelta -) - -if typing.TYPE_CHECKING: - revlogrevisiondelta = RevLogRevisionDelta - - @attr.s(frozen=True) class RevLogProblem: warning = attr.ib(default=None, type=Optional[bytes])