diff --git a/src/psygnal/_group.py b/src/psygnal/_group.py index 3d2a6eed..3f3d0632 100644 --- a/src/psygnal/_group.py +++ b/src/psygnal/_group.py @@ -269,7 +269,13 @@ def _inner(slot: Callable) -> Callable: return _inner if slot is None else _inner(slot) def block(self, exclude: Container[str | SignalInstance] = ()) -> None: - """Block this signal and all emitters from emitting.""" + """Block this signal and all emitters from emitting. + + Parameters + ---------- + exclude : Container[str | SignalInstance] + Signals to exclude from blocking, given by name or instance. + """ super().block() for name, sig in self._signals.items(): if name in exclude or sig in exclude: diff --git a/src/psygnal/_group_descriptor.py b/src/psygnal/_group_descriptor.py index ef54001a..f429d7f9 100644 --- a/src/psygnal/_group_descriptor.py +++ b/src/psygnal/_group_descriptor.py @@ -768,7 +768,7 @@ def connect_child_events( This is useful when you have a tree of objects, and you want to connect all events from the children to the parent. - Parameters. + Parameters ---------- obj : object The object to connect events from. If it is not evented, this function will diff --git a/src/psygnal/containers/_evented_list.py b/src/psygnal/containers/_evented_list.py index cb7aa036..65568334 100644 --- a/src/psygnal/containers/_evented_list.py +++ b/src/psygnal/containers/_evented_list.py @@ -398,7 +398,15 @@ def __hash__(self) -> int: ) def reverse(self, *, emit_individual_events: bool = False) -> None: - """Reverse list *IN PLACE*.""" + """Reverse list *IN PLACE*. + + Parameters + ---------- + emit_individual_events : bool + If True, the list is reversed one item at a time, emitting per-item + events; otherwise the underlying data is reversed directly, by + default False + """ if emit_individual_events: super().reverse() else: diff --git a/src/psygnal/containers/_selectable_evented_list.py b/src/psygnal/containers/_selectable_evented_list.py index bebe8da2..cdcf8ef8 100644 --- a/src/psygnal/containers/_selectable_evented_list.py +++ b/src/psygnal/containers/_selectable_evented_list.py @@ -52,7 +52,15 @@ def _on_item_removed(self, idx: int, obj: Any) -> None: self.selection.discard(obj) def insert(self, index: int, value: _T) -> None: - """Insert item(s) into the list and update the selection.""" + """Insert item(s) into the list and update the selection. + + Parameters + ---------- + index : int + The index at which to insert the item. + value : _T + The item to insert. + """ super().insert(index, value) if self._activate_on_insert: self.selection.active = value @@ -102,7 +110,17 @@ def select_next( def select_previous( self, expand_selection: bool = False, wraparound: bool = False ) -> None: - """Select the previous item in the list.""" + """Select the previous item in the list. + + Parameters + ---------- + expand_selection : bool + If True, will expand the selection to contain both the current item and + the previous item, by default False + wraparound : bool + Whether to return to the end of the list if the beginning has been + reached, by default False + """ self.select_next( step=-1, expand_selection=expand_selection, wraparound=wraparound ) diff --git a/src/psygnal/containers/_selection.py b/src/psygnal/containers/_selection.py index 43dbdee7..84008771 100644 --- a/src/psygnal/containers/_selection.py +++ b/src/psygnal/containers/_selection.py @@ -191,6 +191,12 @@ def selection(self) -> Selection[_S]: # pragma: no cover @selection.setter def selection(self, new_selection: Iterable[_S]) -> None: # pragma: no cover - """Set selection, without deleting selection model object.""" + """Set selection, without deleting selection model object. + + Parameters + ---------- + new_selection : Iterable[_S] + The items to select. + """ self._selection.intersection_update(new_selection) self._selection.update(new_selection) diff --git a/src/psygnal/qt.py b/src/psygnal/qt.py index 81805a00..b8da10cf 100644 --- a/src/psygnal/qt.py +++ b/src/psygnal/qt.py @@ -67,6 +67,8 @@ def start_emitting_from_queue( def stop_emitting_from_queue(thread: Thread | None = None) -> None: """Stop the QTimer that monitors the global emission queue. + Parameters + ---------- thread : Thread, optional The thread in which to stop the QTimer. By default, will stop any QTimers in the thread from which this function is called.