##// END OF EJS Templates
Type(allow_none=True)
Sylvain Corlay -
Show More
@@ -46,7 +46,7 b' class InProcessKernel(IPythonKernel):'
46 # Kernel interface
46 # Kernel interface
47 #-------------------------------------------------------------------------
47 #-------------------------------------------------------------------------
48
48
49 shell_class = Type()
49 shell_class = Type(allow_none=True)
50 shell_streams = List()
50 shell_streams = List()
51 control_stream = Any()
51 control_stream = Any()
52 iopub_socket = Instance(DummySocket, ())
52 iopub_socket = Instance(DummySocket, ())
@@ -49,7 +49,7 b' class KernelManager(ConnectionFileMixin):'
49
49
50 # the class to create with our `client` method
50 # the class to create with our `client` method
51 client_class = DottedObjectName('IPython.kernel.blocking.BlockingKernelClient')
51 client_class = DottedObjectName('IPython.kernel.blocking.BlockingKernelClient')
52 client_factory = Type()
52 client_factory = Type(allow_none=True)
53 def _client_class_changed(self, name, old, new):
53 def _client_class_changed(self, name, old, new):
54 self.client_factory = import_item(str(new))
54 self.client_factory = import_item(str(new))
55
55
@@ -603,7 +603,7 b' class DirectView(View):'
603
603
604
604
605 If block=False
605 If block=False
606 An :class:`~IPython.parallel.client.asyncresult.AsyncMapResult` instance.
606 An :class:`~ipython_parallel.client.asyncresult.AsyncMapResult` instance.
607 An object like AsyncResult, but which reassembles the sequence of results
607 An object like AsyncResult, but which reassembles the sequence of results
608 into a single list. AsyncMapResults can be iterated through before all
608 into a single list. AsyncMapResults can be iterated through before all
609 results are complete.
609 results are complete.
@@ -180,7 +180,7 b' help="""select the task scheduler scheme [default: Python LRU]'
180 self.scheme = globals()[new]
180 self.scheme = globals()[new]
181
181
182 # input arguments:
182 # input arguments:
183 scheme = Instance(FunctionType, allow_none=True) # function for determining the destination
183 scheme = Instance(FunctionType) # function for determining the destination
184 def _scheme_default(self):
184 def _scheme_default(self):
185 return leastload
185 return leastload
186 client_stream = Instance(zmqstream.ZMQStream, allow_none=True) # client-facing stream
186 client_stream = Instance(zmqstream.ZMQStream, allow_none=True) # client-facing stream
@@ -190,7 +190,7 b' help="""select the task scheduler scheme [default: Python LRU]'
190 query_stream = Instance(zmqstream.ZMQStream, allow_none=True) # hub-facing DEALER stream
190 query_stream = Instance(zmqstream.ZMQStream, allow_none=True) # hub-facing DEALER stream
191
191
192 # internals:
192 # internals:
193 queue = Instance(deque, allow_none=True) # sorted list of Jobs
193 queue = Instance(deque) # sorted list of Jobs
194 def _queue_default(self):
194 def _queue_default(self):
195 return deque()
195 return deque()
196 queue_map = Dict() # dict by msg_id of Jobs (for O(1) access to the Queue)
196 queue_map = Dict() # dict by msg_id of Jobs (for O(1) access to the Queue)
@@ -87,7 +87,7 b' def signature_removed(nb):'
87 class NotebookNotary(LoggingConfigurable):
87 class NotebookNotary(LoggingConfigurable):
88 """A class for computing and verifying notebook signatures."""
88 """A class for computing and verifying notebook signatures."""
89
89
90 profile_dir = Instance("IPython.core.profiledir.ProfileDir", allow_none=True)
90 profile_dir = Instance("IPython.core.profiledir.ProfileDir")
91 def _profile_dir_default(self):
91 def _profile_dir_default(self):
92 from IPython.core.application import BaseIPythonApplication
92 from IPython.core.application import BaseIPythonApplication
93 app = None
93 app = None
@@ -388,7 +388,7 b' class TrustNotebookApp(BaseIPythonApplication):'
388 """
388 """
389 )
389 )
390
390
391 notary = Instance(NotebookNotary, allow_none=True)
391 notary = Instance(NotebookNotary)
392 def _notary_default(self):
392 def _notary_default(self):
393 return NotebookNotary(parent=self, profile_dir=self.profile_dir)
393 return NotebookNotary(parent=self, profile_dir=self.profile_dir)
394
394
General Comments 0
You need to be logged in to leave comments. Login now