comparison mercurial/fancyopts.py @ 36383:24b481668293

py3: replace types.NoneType with type(None) types.NoneType is not present in Python 3.
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 23 Feb 2018 18:23:51 +0530
parents cc9d0763c8e9
children ef6215df2402
comparison
equal deleted inserted replaced
36382:b4d1c09b754b 36383:24b481668293
7 7
8 from __future__ import absolute_import 8 from __future__ import absolute_import
9 9
10 import abc 10 import abc
11 import functools 11 import functools
12 import types
13 12
14 from .i18n import _ 13 from .i18n import _
15 from . import ( 14 from . import (
16 error, 15 error,
17 pycompat, 16 pycompat,
220 219
221 On failure, abort can be called with a string error message.""" 220 On failure, abort can be called with a string error message."""
222 221
223 class _simpleopt(customopt): 222 class _simpleopt(customopt):
224 def _isboolopt(self): 223 def _isboolopt(self):
225 return isinstance(self.defaultvalue, (bool, types.NoneType)) 224 return isinstance(self.defaultvalue, (bool, type(None)))
226 225
227 def newstate(self, oldstate, newparam, abort): 226 def newstate(self, oldstate, newparam, abort):
228 return newparam 227 return newparam
229 228
230 class _callableopt(customopt): 229 class _callableopt(customopt):