From 92a3986a8f2da03c11e5b6b9078d8ad5ccc3e411 Mon Sep 17 00:00:00 2001 From: Ian McEwen Date: Mon, 21 Oct 2024 16:39:47 -0700 Subject: [PATCH] Improve comments for pdoc --- meshtastic/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index c746e95..8c7aeae 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -134,7 +134,9 @@ class ResponseHandler(NamedTuple): """A pending response callback, waiting for a response to one of our messages""" # requestId: int - used only as a key + #: a callable to call when a response is received callback: Callable + #: Whether ACKs and NAKs should be passed to this handler ackPermitted: bool = False # FIXME, add timestamp and age out old requests @@ -142,11 +144,11 @@ class ResponseHandler(NamedTuple): class KnownProtocol(NamedTuple): """Used to automatically decode known protocol payloads""" + #: A descriptive name (e.g. "text", "user", "admin") name: str - # portnum: int, now a key - # If set, will be called to prase as a protocol buffer + #: If set, will be called to parse as a protocol buffer protobufFactory: Optional[Callable] = None - # If set, invoked as onReceive(interface, packet) + #: If set, invoked as onReceive(interface, packet) onReceive: Optional[Callable] = None