Mercurial > public > mercurial-scm > hg
diff mercurial/vfs.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 | 7346f93be7a4 |
children | 6ee3c401882b |
line wrap: on
line diff
--- a/mercurial/vfs.py Sun Jan 05 22:12:02 2025 -0500 +++ b/mercurial/vfs.py Sun Jan 05 22:23:31 2025 -0500 @@ -786,7 +786,7 @@ """ def __init__(self, fh, closer) -> None: - super(delayclosedfile, self).__init__(fh) + super().__init__(fh) object.__setattr__(self, '_closer', closer) def __exit__(self, exc_type, exc_value, exc_tb) -> None: @@ -900,7 +900,7 @@ """ def __init__(self, fh) -> None: - super(checkambigatclosing, self).__init__(fh) + super().__init__(fh) object.__setattr__(self, '_oldstat', util.filestat.frompath(fh.name)) def _checkambig(self) -> None: