Skip to content

Allow multi-value and unset custom properties in device and event type hints - #215

Merged
Mo-Elshenawy1 merged 2 commits into
mainfrom
claude/exciting-cori-o7rsiy-fu-property-types
Nov 6, 2026
Merged

Mo-Elshenawy1 merged 2 commits into
mainfrom
claude/exciting-cori-o7rsiy-fu-property-types

Conversation

@Mo-Elshenawy1

Copy link
Copy Markdown
Contributor

Changelog

Device and event properties type hints accept lists of strings for multi-value properties, and None on updates to unset a property.

Docs

None

Description

The v1 API accepts a list of strings for a multi-value enum custom property, and on updates a null value unsets a property. The properties type hints on create_event, update_event, create_device and update_device allowed only scalars, so type checkers rejected valid calls. They now accept List[str], and None on the update methods.

Only hints and docstrings change; the requests sent are the same. The update_event docstring also said "device" where it meant "event", which is corrected. Session methods are left to the open sessions PR, to avoid a conflict.

Validated with black, flake8, pyright (including a scratch check of calls passing lists and None), and pytest on Python 3.8: 204 passed. The ROS message tests can't install their dependencies in my environment, so CI covers those.

BeforeAfter

client.update_device(device_id="dev_1", properties={"tags": ["a", "b"], "old": None}) was flagged by type checkers.

It type-checks and sends the same request.


Generated by Claude Code

The `properties` type hints on `create_device`, `update_device`,
`create_event`, and `update_event` now accept a list of strings for custom
properties that take multiple enum values, and the update methods also accept
`None` to unset a property. Docstrings describe both. Request bodies are
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012yf4xszPJuZbmsVHpZeUGr
@linear-code

linear-code Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

BFCK-573

DC-2076

@foxglove-beefcake foxglove-beefcake Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Risk: low. The change only widens type hints and edits docstrings, and the request bodies that the client sends do not change.

@foxglove-beefcake foxglove-beefcake Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Risk: low. The change only widens type hints and edits docstrings, and the request bodies that the client sends do not change.

@Mo-Elshenawy1
Mo-Elshenawy1 merged commit 88feb96 into main Nov 6, 2026
2 checks passed
@Mo-Elshenawy1
Mo-Elshenawy1 deleted the claude/exciting-cori-o7rsiy-fu-property-types branch November 6, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants