[PATCH 10 of 11] py3: replace types.NoneType with type(None)
Pulkit Goyal
7895pulkit at gmail.com
Fri Feb 23 13:15:23 EST 2018
# HG changeset patch
# User Pulkit Goyal <7895pulkit at gmail.com>
# Date 1519390431 -19800
# Fri Feb 23 18:23:51 2018 +0530
# Node ID c8124f3591d41903f701df60f6786db8c77fb13d
# Parent 1e72b28e804b014573a8e156ae46129f44979c51
py3: replace types.NoneType with type(None)
types.NoneType is not present in Python 3.
diff --git a/mercurial/fancyopts.py b/mercurial/fancyopts.py
--- a/mercurial/fancyopts.py
+++ b/mercurial/fancyopts.py
@@ -9,7 +9,6 @@ from __future__ import absolute_import
import abc
import functools
-import types
from .i18n import _
from . import (
@@ -222,7 +221,7 @@ class customopt(object):
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
More information about the Mercurial-devel
mailing list