Skip to content

Improve can.Bus typing #1557

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

Merged
merged 1 commit into from
May 15, 2023
Merged

Improve can.Bus typing #1557

merged 1 commit into from
May 15, 2023

Conversation

zariiii9003
Copy link
Collaborator

Convert can.Bus into a function to clean up a lot of the messy typing. This should fix the pyright abstract class complaints.

I had to move the can.BusABC documentation from internal-api.rst to bus.rst, the private methods of can.BusABC are still documented in internal-api.rst.

@zariiii9003 zariiii9003 added the QA about improving and maintaining the quality of the library label Apr 4, 2023
@zariiii9003 zariiii9003 requested a review from hardbyte April 4, 2023 21:13
Copy link
Collaborator

@lumagi lumagi left a comment

Choose a reason for hiding this comment

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

I took the liberty of reviewing the PR. I think this is a really nice change. I know that having both Bus and BusABC was something that confused me when I first started using python-can.

@zariiii9003
Copy link
Collaborator Author

Thank you for taking a look. I will wait with merging until 4.2 is released.
I had the same experience with Bus and BusABC. 😄

I'd like to hear more opinions on this though.

Copy link
Owner

@hardbyte hardbyte left a comment

Choose a reason for hiding this comment

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

Great job. I remember really struggling with the Bus/BusABC design many many years ago!

@zariiii9003 zariiii9003 merged commit 25fe566 into hardbyte:develop May 15, 2023
@zariiii9003 zariiii9003 deleted the bus_func branch May 15, 2023 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA about improving and maintaining the quality of the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants