comparison mercurial/exthelper.py @ 48913:f254fc73d956

global: bulk replace simple pycompat.iteritems(x) with x.items() pycompat.iteritems() just calls .items(). This commit applies a regular expression search and replace to convert simple instances of pycompat.iteritems() with .items(). There are still a handful of calls to pycompat.iteritems() remaining. But these all have more complicated expressions that I wasn't comfortable performing an automated replace on. In addition, some simple replacements were withheld because they broke pytype. These will be handled by their own changesets. Differential Revision: https://phab.mercurial-scm.org/D12318
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 03 Mar 2022 18:28:30 -0800
parents 6000f5b25c9b
children 642e31cb55f0
comparison
equal deleted inserted replaced
48912:a0674e916fb6 48913:f254fc73d956
12 12
13 from . import ( 13 from . import (
14 commands, 14 commands,
15 error, 15 error,
16 extensions, 16 extensions,
17 pycompat,
18 registrar, 17 registrar,
19 ) 18 )
20 19
21 from hgdemandimport import tracing 20 from hgdemandimport import tracing
22 21
112 self.templatekeyword._merge(other.templatekeyword) 111 self.templatekeyword._merge(other.templatekeyword)
113 self._commandwrappers.extend(other._commandwrappers) 112 self._commandwrappers.extend(other._commandwrappers)
114 self._extcommandwrappers.extend(other._extcommandwrappers) 113 self._extcommandwrappers.extend(other._extcommandwrappers)
115 self._functionwrappers.extend(other._functionwrappers) 114 self._functionwrappers.extend(other._functionwrappers)
116 self.cmdtable.update(other.cmdtable) 115 self.cmdtable.update(other.cmdtable)
117 for section, items in pycompat.iteritems(other.configtable): 116 for section, items in other.configtable.items():
118 if section in self.configtable: 117 if section in self.configtable:
119 self.configtable[section].update(items) 118 self.configtable[section].update(items)
120 else: 119 else:
121 self.configtable[section] = items 120 self.configtable[section] = items
122 121