Mercurial > public > mercurial-scm > hg-stable
diff tests/test-lock.py @ 52668: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 | e3952d8cfeb5 |
children |
line wrap: on
line diff
--- a/tests/test-lock.py Sun Jan 05 22:12:02 2025 -0500 +++ b/tests/test-lock.py Sun Jan 05 22:23:31 2025 -0500 @@ -29,10 +29,10 @@ # lock.lock.__init__() calls lock(), so the pidoffset assignment needs # to be earlier self._pidoffset = pidoffset - super(lockwrapper, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) def _getpid(self): - return super(lockwrapper, self)._getpid() + self._pidoffset + return super()._getpid() + self._pidoffset class teststate: