Mercurial > public > mercurial-scm > hg
comparison mercurial/config.py @ 48920:b4ab4fd23199
config: remove pycompat.iteritems()
Differential Revision: https://phab.mercurial-scm.org/D12325
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 01 Mar 2022 20:47:37 -0800 |
parents | f5127b87f160 |
children | 642e31cb55f0 |
comparison
equal
deleted
inserted
replaced
48919:8b3f3f10e808 | 48920:b4ab4fd23199 |
---|---|
12 from .i18n import _ | 12 from .i18n import _ |
13 from .pycompat import getattr | 13 from .pycompat import getattr |
14 from . import ( | 14 from . import ( |
15 encoding, | 15 encoding, |
16 error, | 16 error, |
17 pycompat, | |
18 util, | 17 util, |
19 ) | 18 ) |
20 | 19 |
21 | 20 |
22 class config(object): | 21 class config(object): |
108 | 107 |
109 def sections(self): | 108 def sections(self): |
110 return sorted(self._data.keys()) | 109 return sorted(self._data.keys()) |
111 | 110 |
112 def items(self, section): | 111 def items(self, section): |
113 items = pycompat.iteritems(self._data.get(section, {})) | 112 items = self._data.get(section, {}).items() |
114 return [(k, v[0]) for (k, v) in items] | 113 return [(k, v[0]) for (k, v) in items] |
115 | 114 |
116 def set(self, section, item, value, source=b""): | 115 def set(self, section, item, value, source=b""): |
117 assert not isinstance( | 116 assert not isinstance( |
118 section, str | 117 section, str |