##// END OF EJS Templates
Added doc strings to properties in widget.py
Jonathan Frederic -
Show More
@@ -77,6 +77,7 b' class Widget(LoggingConfigurable):'
77 #-------------------------------------------------------------------------
77 #-------------------------------------------------------------------------
78 @property
78 @property
79 def keys(self):
79 def keys(self):
80 """Gets a list of the traitlets that should be synced with the front-end."""
80 if self._keys is None:
81 if self._keys is None:
81 self._keys = []
82 self._keys = []
82 for trait_name in self.trait_names():
83 for trait_name in self.trait_names():
@@ -86,6 +87,9 b' class Widget(LoggingConfigurable):'
86
87
87 @property
88 @property
88 def comm(self):
89 def comm(self):
90 """Gets the Comm associated with this widget.
91
92 If a Comm doesn't exist yet, a Comm will be created automagically."""
89 if self._comm is None:
93 if self._comm is None:
90 # Create a comm.
94 # Create a comm.
91 self._comm = Comm(target_name=self.model_name)
95 self._comm = Comm(target_name=self.model_name)
@@ -99,6 +103,9 b' class Widget(LoggingConfigurable):'
99
103
100 @property
104 @property
101 def model_id(self):
105 def model_id(self):
106 """Gets the model id of this widget.
107
108 If a Comm doesn't exist yet, a Comm will be created automagically."""
102 return self.comm.comm_id
109 return self.comm.comm_id
103
110
104 #-------------------------------------------------------------------------
111 #-------------------------------------------------------------------------
General Comments 0
You need to be logged in to leave comments. Login now