Skip to content

Update to Pybricks 3.6.x#8

Merged
fkleon merged 10 commits intomainfrom
type-fixes
Jun 23, 2025
Merged

Update to Pybricks 3.6.x#8
fkleon merged 10 commits intomainfrom
type-fixes

Conversation

@fkleon
Copy link
Owner

@fkleon fkleon commented May 5, 2025

  • feat: Mark library as typed by including the py.typed marker.
  • feat: Add type check to CI.
  • feat: Add debug logging to message decode/encode.
  • fix: Type fixes for the broadcast data type hints.
  • fix: Type signature for test fixtures.
  • fix: broadcaster: Error when stopping broadcast while no broadcast was active.
  • chore: Update pybricks from 3.5.x to 3.6.x .
  • chore: Update pytest-asyncio to 1.0.0.
  • chore: Update mypy from 1.15 to 1.16.

@fkleon fkleon self-assigned this May 5, 2025
fkleon and others added 8 commits June 23, 2025 23:45
- Use packing args to construct tuple from input
When encountering a message with the single object marker,
return the value as-is without wrapping it into a tuple container.

This matches the Pybricks behaviour, and partically reverts changes
made in a38028c.

However, the virtual hub implementation still wraps single values
into a single object tuple when returning from observer(). This is
due to the type signature on the method of the BLE Hub API, which
does require a tuple to be returned.

This is likely a bug/inaccuracy of the API types, as the Pybricks
firmware itself does not adhere to the type annotation and returns
either a single value, or a tuple.
@fkleon fkleon changed the title Draft: Stop unpacking single values Draft: Update to Pybricks 3.6.x Jun 23, 2025
@fkleon fkleon changed the title Draft: Update to Pybricks 3.6.x Update to Pybricks 3.6.x Jun 23, 2025
@fkleon fkleon merged commit 521ac75 into main Jun 23, 2025
2 checks passed
@fkleon fkleon deleted the type-fixes branch June 23, 2025 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant