Skip to content

nmt: use bytes instead of list for send_message and send_periodic#674

Open
bizfsc wants to merge 2 commits into
masterfrom
feature/nmt-use-bytes
Open

nmt: use bytes instead of list for send_message and send_periodic#674
bizfsc wants to merge 2 commits into
masterfrom
feature/nmt-use-bytes

Conversation

@bizfsc

@bizfsc bizfsc commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

This PR extracts only the nmt.py changes from #651, which covers a broader set of mypy fixes across multiple files. Once the changes here are merged, #651 can be closed, as everything but the test_od changes are covered by other PRs.

The python-can send_message and send_periodic APIs expect bytes, not list[int]. Passing a list is accepted at runtime by some backends but is incorrect according to the type signatures and triggers Pylance and mypy errors. Using bytes literals and bytes() constructor makes the intent explicit and removes the type errors without any behavioral change.

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