changeset 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 b4d1c09b754b
children caa3d42f616d
files mercurial/fancyopts.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/fancyopts.py	Fri Feb 23 18:12:20 2018 +0530
+++ b/mercurial/fancyopts.py	Fri Feb 23 18:23:51 2018 +0530
@@ -9,7 +9,6 @@
 
 import abc
 import functools
-import types
 
 from .i18n import _
 from . import (
@@ -222,7 +221,7 @@
 
 class _simpleopt(customopt):
     def _isboolopt(self):
-        return isinstance(self.defaultvalue, (bool, types.NoneType))
+        return isinstance(self.defaultvalue, (bool, type(None)))
 
     def newstate(self, oldstate, newparam, abort):
         return newparam