Skip to content

Commit a27203d

Browse files
committed
Document LocalBlock init params
1 parent d503f58 commit a27203d

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

python/pyrogue/_Block.py

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,18 +237,35 @@ def __str__(self) -> str:
237237

238238

239239
class LocalBlock(object):
240-
"""Back-end Block class used by LocalVariable
240+
"""Back-end Block class used by LocalVariable.
241241
242242
Stores value in local memory.
243+
244+
Parameters
245+
----------
246+
variable : pr.LocalVariable
247+
Variable associated with this block.
248+
localSet : callable
249+
Setter callback. Expected signature:
250+
``localSet(dev=None, var=None, value, changed=None)``.
251+
localGet : callable
252+
Getter callback. Expected signature:
253+
``localGet(dev=None, var=None)``.
254+
minimum : object
255+
Minimum allowed value (may be ``None``).
256+
maximum : object
257+
Maximum allowed value (may be ``None``).
258+
value : object
259+
Initial value stored in the block.
243260
"""
244261
def __init__(
245262
self,
246263
*,
247-
variable: Any,
248-
localSet: Optional[Any],
249-
localGet: Optional[Any],
250-
minimum: Optional[Any],
251-
maximum: Optional[Any],
264+
variable: pr.LocalVariable,
265+
localSet: Callable[..., Any] | None,
266+
localGet: Callable[..., Any] | None,
267+
minimum: Any | None,
268+
maximum: Any | None,
252269
value: Any,
253270
) -> None:
254271
self._path = variable.path

0 commit comments

Comments
 (0)