Skip to content

Conversation

acolomb
Copy link
Member

@acolomb acolomb commented Jun 22, 2025

As discussed in #594, number literals in code for using the SDO abort protocol are bad for readability. Replace them with named constants.

Copy link

codecov bot commented Jun 22, 2025

Codecov Report

❌ Patch coverage is 66.07143% with 19 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
canopen/sdo/client.py 11.76% 15 Missing ⚠️
canopen/sdo/server.py 42.85% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

@acolomb
Copy link
Member Author

acolomb commented Jun 22, 2025

This is just a start, without actually touching the places where the literals are in use. Can still already get started on bike-shedding for the constant names :-P

@acolomb acolomb added this to the v2.4.0 milestone Jun 30, 2025
@acolomb acolomb marked this pull request as ready for review July 13, 2025 12:46
@acolomb acolomb requested a review from sveinse July 13, 2025 12:46
@acolomb acolomb merged commit 4990572 into canopen-python:master Aug 5, 2025
3 of 5 checks passed
@acolomb acolomb deleted the sdo-abort-constants branch August 5, 2025 09:41
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