allow_none=False by default for Type and Instance

This commit is contained in:
Sylvain Corlay 2015-03-21 16:23:35 -04:00
parent 7673c151a3
commit 1dbd95c4bc
3 changed files with 3 additions and 3 deletions

View File

@ -665,7 +665,7 @@ class NotebookApp(BaseIPythonApplication):
help='The config manager class to use'
)
kernel_spec_manager = Instance(KernelSpecManager)
kernel_spec_manager = Instance(KernelSpecManager, allow_none=True)
kernel_spec_manager_class = Type(
default_value=KernelSpecManager,

View File

@ -20,7 +20,7 @@ class ClusterManager(LoggingConfigurable):
delay = Float(1., config=True,
help="delay (in s) between starting the controller and the engines")
loop = Instance('zmq.eventloop.ioloop.IOLoop')
loop = Instance('zmq.eventloop.ioloop.IOLoop', allow_none=True)
def _loop_default(self):
from zmq.eventloop.ioloop import IOLoop
return IOLoop.instance()

View File

@ -129,7 +129,7 @@ class Widget(LoggingConfigurable):
If empty, look in the global registry.""", sync=True)
_view_name = Unicode(None, allow_none=True, help="""Default view registered in the front-end
to use to represent the widget.""", sync=True)
comm = Instance('IPython.kernel.comm.Comm')
comm = Instance('IPython.kernel.comm.Comm', allow_none=True)
msg_throttle = Int(3, sync=True, help="""Maximum number of msgs the
front-end can send before receiving an idle msg from the back-end.""")