Mercurial > public > mercurial-scm > hg
diff hgext/largefiles/reposetup.py @ 52643:5cc8deb96b48
pyupgrade: modernize calls to superclass methods
This is the `legacy` fixer in `pyupgrade`, with the loop yielding the offset of
`yield` statements commented out.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 05 Jan 2025 22:23:31 -0500 |
parents | f4733654f144 |
children |
line wrap: on
line diff
--- a/hgext/largefiles/reposetup.py Sun Jan 05 22:12:02 2025 -0500 +++ b/hgext/largefiles/reposetup.py Sun Jan 05 22:23:31 2025 -0500 @@ -48,7 +48,7 @@ # identifies the largefiles as always binary, regardless of # their actual contents. def __getitem__(self, changeid): - ctx = super(lfilesrepo, self).__getitem__(changeid) + ctx = super().__getitem__(changeid) if self.lfstatus: def files(orig): @@ -62,7 +62,7 @@ class lfilesmanifest(man1.__class__): def __contains__(self, filename): - orig = super(lfilesmanifest, self).__contains__ + orig = super().__contains__ return orig(filename) or orig( lfutil.standin(filename) ) @@ -111,7 +111,7 @@ listsubrepos=False, ): listignored, listclean, listunknown = ignored, clean, unknown - orig = super(lfilesrepo, self).status + orig = super().status if not self.lfstatus: return orig( node1, @@ -331,11 +331,11 @@ return scmutil.status(*result) def commitctx(self, ctx, *args, **kwargs): - node = super(lfilesrepo, self).commitctx(ctx, *args, **kwargs) + node = super().commitctx(ctx, *args, **kwargs) class lfilesctx(ctx.__class__): def markcommitted(self, node): - orig = super(lfilesctx, self).markcommitted + orig = super().markcommitted return lfutil.markcommitted(orig, self, node) ctx.__class__ = lfilesctx @@ -356,7 +356,7 @@ ): if extra is None: extra = {} - orig = super(lfilesrepo, self).commit + orig = super().commit with self.wlock(): lfcommithook = self._lfcommithooks[-1]