Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect bytearray type hint in diagnostics query #1983

Merged
merged 3 commits into from
Feb 9, 2024

Conversation

alexrudd2
Copy link
Collaborator

(I'm trying pyright and it seems to be stricter than mypy)

Since #1638 it has not been possible to pass a bytearray to diag_query_data.

Note:

>>> msg = bytearray()
>>> type(msg)
<class 'bytearray'>
>>> isinstance(msg, bytes)
False

Also, re-enable DiagnasticStatusResponse enconding test, although it doesn't actually test much, ha.

Copy link
Collaborator

@janiversen janiversen left a comment

Choose a reason for hiding this comment

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

You are right it's not much of a test, not my focus point at the moment.

Thanks for the fix.

@janiversen janiversen merged commit 00a9607 into dev Feb 9, 2024
1 check passed
@janiversen janiversen deleted the bytearray-typehint branch February 9, 2024 07:59
@alexrudd2
Copy link
Collaborator Author

Yeah, it's clear nobody has used those functions in years (ever?), so it's a safe starting point to experiment (again) with type checks,

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants