Mercurial > public > mercurial-scm > hg
diff mercurial/configitems.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/mercurial/configitems.py Sun Jan 05 22:12:02 2025 -0500 +++ b/mercurial/configitems.py Sun Jan 05 22:23:31 2025 -0500 @@ -80,20 +80,20 @@ """A specialized dictionary that can handle wild-card selection""" def __init__(self): - super(itemregister, self).__init__() + super().__init__() self._generics = set() def update(self, other): # pytype: disable=signature-mismatch - super(itemregister, self).update(other) + super().update(other) self._generics.update(other._generics) def __setitem__(self, key, item): - super(itemregister, self).__setitem__(key, item) + super().__setitem__(key, item) if item.generic: self._generics.add(item) def get(self, key): - baseitem = super(itemregister, self).get(key) + baseitem = super().get(key) if baseitem is not None and not baseitem.generic: return baseitem