Skip to content

eds: Style cleanup and simplification, warning fixes#675

Open
acolomb wants to merge 11 commits into
canopen-python:masterfrom
acolomb:cleanup-eds
Open

eds: Style cleanup and simplification, warning fixes#675
acolomb wants to merge 11 commits into
canopen-python:masterfrom
acolomb:cleanup-eds

Conversation

@acolomb

@acolomb acolomb commented Jun 27, 2026

Copy link
Copy Markdown
Member

This should not result in any functional behavior changes. It mainly fixes some of the clumsy code in eds.py and avoids type checker errors in the process.

See individual commit messages for more details on the changes.

acolomb added 11 commits June 27, 2026 23:38
Rename "match" variable, which is a language keyword.
Follow a common pattern of retrieving a raw_string from the parsed EDS
outside of the block for catching ValueError, which is not raised from
the RawConfigParser call.  Fixes some type checker errors.  Some more
need to be squelched, for custom attribute additions.
Follow the mypy advice about incompatible type.  Silence the method
assignment error, as that's a legitimate an documented use case on
this class.
@codecov

codecov Bot commented Jun 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.76923% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
canopen/objectdictionary/eds.py 90.76% 3 Missing and 3 partials ⚠️

📢 Thoughts on this report? Let us know!

@acolomb

acolomb commented Jun 27, 2026

Copy link
Copy Markdown
Member Author

I have another PR branch prepared which is based on top of this one. It adds a "strict" mode flag where EDS importing raises exceptions instead of just logging warnings. See this branch, which will be submitted as PR once this cleanup is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant