Mercurial > public > mercurial-scm > hg-stable
diff mercurial/subrepo.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 | 35cc15fbc523 |
children | 5c48fd4c0e68 |
line wrap: on
line diff
--- a/mercurial/subrepo.py Sun Jan 05 22:12:02 2025 -0500 +++ b/mercurial/subrepo.py Sun Jan 05 22:23:31 2025 -0500 @@ -454,7 +454,7 @@ class hgsubrepo(abstractsubrepo): def __init__(self, ctx, path, state, allowcreate): - super(hgsubrepo, self).__init__(ctx, path) + super().__init__(ctx, path) self._state = state r = ctx.repo() root = r.wjoin(util.localpath(path)) @@ -1117,7 +1117,7 @@ class svnsubrepo(abstractsubrepo): def __init__(self, ctx, path, state, allowcreate): - super(svnsubrepo, self).__init__(ctx, path) + super().__init__(ctx, path) self._state = state self._exe = procutil.findexe(b'svn') if not self._exe: @@ -1378,7 +1378,7 @@ class gitsubrepo(abstractsubrepo): def __init__(self, ctx, path, state, allowcreate): - super(gitsubrepo, self).__init__(ctx, path) + super().__init__(ctx, path) self._state = state self._abspath = ctx.repo().wjoin(path) self._subparent = ctx.repo()