Mercurial > public > mercurial-scm > hg
diff hgext/mq.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 | 24ee91ba9aa8 |
children |
line wrap: on
line diff
--- a/hgext/mq.py Sun Jan 05 22:12:02 2025 -0500 +++ b/hgext/mq.py Sun Jan 05 22:23:31 2025 -0500 @@ -4086,7 +4086,7 @@ return queue(self.ui, self.baseui, self.path) def invalidateall(self): - super(mqrepo, self).invalidateall() + super().invalidateall() if localrepo.hasunfilteredcache(self, 'mq'): # recreate mq in case queue path was changed delattr(self.unfiltered(), 'mq') @@ -4114,9 +4114,7 @@ _(b'cannot commit over an applied mq patch'), force ) - return super(mqrepo, self).commit( - text, user, date, match, force, editor, extra - ) + return super().commit(text, user, date, match, force, editor, extra) def checkpush(self, pushop): if self.mq.applied and self.mq.checkapplied and not pushop.force: @@ -4136,11 +4134,11 @@ if self[node].phase() < phases.secret: raise error.Abort(_(b'source has mq patches applied')) # no non-secret patches pushed - super(mqrepo, self).checkpush(pushop) + super().checkpush(pushop) def _findtags(self): '''augment tags from base class with patch tags''' - result = super(mqrepo, self)._findtags() + result = super()._findtags() q = self.mq if not q.applied: