From c8f24e9fc5bead8a1781343ed6a692e927488335 Mon Sep 17 00:00:00 2001 From: Adam Huganir Date: Sun, 25 Jan 2026 15:56:23 -0500 Subject: [PATCH 1/2] prevent warnings for invalid escape sequences in docstrings --- libpebble2/protocol/base/types.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libpebble2/protocol/base/types.py b/libpebble2/protocol/base/types.py index 0d0f04a..0cde2ce 100644 --- a/libpebble2/protocol/base/types.py +++ b/libpebble2/protocol/base/types.py @@ -189,8 +189,8 @@ class Union(Field): :param determinant: The field that is used to determine which possible entry to use. :type determinant: Field - :param contents: A :class:`dict` mapping values of ``determinant`` to either :class:`Field`\ s or - :class:`PebblePacket`\ s + :param contents: A :class:`dict` mapping values of ``determinant`` to either :class:`Field`\\ s or + :class:`PebblePacket`\\ s that this :class:`Union` can represent. This dictionary is inverted for use in serialisation, so it should be a one-to-one mapping. :type contents: dict @@ -424,7 +424,7 @@ def dependent_fields(self): class PascalList(Field): """ - Represents a list of :class:`.PebblePacket`\ s, each of which is prefixed with a byte indicating its length. + Represents a list of :class:`.PebblePacket`\\ s, each of which is prefixed with a byte indicating its length. :param member_type: The type of :class:`.PebblePacket` in the list. :type member_type: ~builtins.type @@ -479,7 +479,7 @@ def dependent_fields(self): class FixedList(Field): """ - Represents a list of either :class:`PebblePacket`\ s or :class:`Field`\ s with either a fixed number of entries, + Represents a list of either :class:`PebblePacket`\\ s or :class:`Field`\\ s with either a fixed number of entries, a fixed length (in bytes), or both. There are no dividers between entries; the members must be fixed-length. If neither ``count`` nor ``length`` is set, members will be read until the end of the buffer. From 4bcea1cfe2de65258bdc52af7a04fda9a57c752b Mon Sep 17 00:00:00 2001 From: Adam Huganir Date: Sun, 25 Jan 2026 15:58:22 -0500 Subject: [PATCH 2/2] file #2 fix escape sequences --- libpebble2/protocol/base/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpebble2/protocol/base/__init__.py b/libpebble2/protocol/base/__init__.py index 9d2c04d..7ca44de 100644 --- a/libpebble2/protocol/base/__init__.py +++ b/libpebble2/protocol/base/__init__.py @@ -100,7 +100,7 @@ class Meta: command = Uint8(default=0x01) response = Uint8(enum=AppFetchStatus) - :param \*\*kwargs: Initial values for any properties on the object. + :param \\*\\*kwargs: Initial values for any properties on the object. """ def __init__(self, **kwargs): for k, v in iteritems(kwargs):