Mercurial > public > mercurial-scm > hg-stable
diff mercurial/config.py @ 48981:f5127b87f160
config: remove conditional asserts
We always run on Python 3 now.
Differential Revision: https://phab.mercurial-scm.org/D12293
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 21 Feb 2022 10:27:34 -0700 |
parents | 6000f5b25c9b |
children | b4ab4fd23199 |
line wrap: on
line diff
--- a/mercurial/config.py Mon Feb 21 10:27:02 2022 -0700 +++ b/mercurial/config.py Mon Feb 21 10:27:34 2022 -0700 @@ -114,16 +114,15 @@ return [(k, v[0]) for (k, v) in items] def set(self, section, item, value, source=b""): - if pycompat.ispy3: - assert not isinstance( - section, str - ), b'config section may not be unicode strings on Python 3' - assert not isinstance( - item, str - ), b'config item may not be unicode strings on Python 3' - assert not isinstance( - value, str - ), b'config values may not be unicode strings on Python 3' + assert not isinstance( + section, str + ), b'config section may not be unicode strings on Python 3' + assert not isinstance( + item, str + ), b'config item may not be unicode strings on Python 3' + assert not isinstance( + value, str + ), b'config values may not be unicode strings on Python 3' if section not in self: self._data[section] = util.cowsortdict() else: