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

Use baudrate directly to solve mypy errors #1872

Merged
merged 1 commit into from
Oct 30, 2023
Merged

Use baudrate directly to solve mypy errors #1872

merged 1 commit into from
Oct 30, 2023

Conversation

alexrudd2
Copy link
Collaborator

This solves another 2 mypy implicit optional errors

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.

This change is technically correct....but it confuses me as to why it is needed.

Could it be that self.comm_params.baudrate is defined wrongly ?

The reason for the question, is that the code you change will be moved as soon as I start integrating transport into the sync clients.

@alexrudd2
Copy link
Collaborator Author

Could it be that self.comm_params.baudrate is defined wrongly ?

I could not figure out the problem with self.comm_params.baudrate, either.

My guess is that mypy is confused with kwargs.get().

baudrate=kwargs.get("baudrate", None),

the code you change will be moved as soon as I start integrating transport into the sync clients

Well, at least now it is consistent with nearby code. (e.g. stopbits instead of self.comm_params.stopbits), so the refactor should be easier?

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.

OK, I have no strong feelings for either one.

@janiversen janiversen merged commit 33647e7 into dev Oct 30, 2023
1 check passed
@janiversen janiversen deleted the serial-baudrate branch October 30, 2023 20:26
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 10, 2023
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