@@ -213,6 +213,7 @@ def redraw(self):
213213 self .draw ()
214214
215215 def find_by_name (self , name ):
216+ # type: (str) -> SceneObject
216217 """Find the first scene object with the given name.
217218
218219 Parameters
@@ -225,10 +226,10 @@ def find_by_name(self, name):
225226 :class:`SceneObject`
226227
227228 """
228- # type: (str) -> SceneObject
229229 return self .get_node_by_name (name = name )
230230
231231 def find_by_itemtype (self , itemtype ):
232+ # type: (...) -> SceneObject | None
232233 """Find the first scene object with a data item of the given type.
233234
234235 Parameters
@@ -238,16 +239,27 @@ def find_by_itemtype(self, itemtype):
238239
239240 Returns
240241 -------
241- :class:`SceneObject`
242+ :class:`SceneObject` or None
242243
243244 """
244- # type: (Type[compas.data.Data]) -> SceneObject
245245 for obj in self .objects :
246246 if isinstance (obj .item , itemtype ):
247247 return obj
248248
249249 def find_all_by_itemtype (self , itemtype ):
250- # type: (Type[compas.data.Data]) -> list[SceneObject]
250+ # type: (...) -> list[SceneObject]
251+ """Find all scene objects with a data item of the given type.
252+
253+ Parameters
254+ ----------
255+ itemtype : :class:`compas.data.Data`
256+ The type of the data item associated with the scene object.
257+
258+ Returns
259+ -------
260+ list[:class:`SceneObject`]
261+
262+ """
251263 sceneobjects = []
252264 for obj in self .objects :
253265 if isinstance (obj .item , itemtype ):
0 commit comments