christiansandberg / canopen

CANopen for Python
http://canopen.readthedocs.io/
MIT License
446 stars 196 forks source link

Fix some type checker errors in network module #534

Closed acolomb closed 3 months ago

acolomb commented 3 months ago

Contains fixes from #512 as well, but with a slightly simpler approach.

codecov-commenter commented 3 months ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 71.04%. Comparing base (83594ac) to head (b8187cd). Report is 2 commits behind head on master.

Files Patch % Lines
canopen/nmt.py 60.00% 1 Missing and 1 partial :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/christiansandberg/canopen/pull/534/graphs/tree.svg?width=650&height=150&src=pr&token=3wUNWZVohh&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Christian+Sandberg)](https://app.codecov.io/gh/christiansandberg/canopen/pull/534?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Christian+Sandberg) ```diff @@ Coverage Diff @@ ## master #534 +/- ## ========================================== - Coverage 71.10% 71.04% -0.06% ========================================== Files 26 26 Lines 3111 3112 +1 Branches 526 527 +1 ========================================== - Hits 2212 2211 -1 - Misses 769 770 +1 - Partials 130 131 +1 ``` | [Files](https://app.codecov.io/gh/christiansandberg/canopen/pull/534?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Christian+Sandberg) | Coverage Δ | | |---|---|---| | [canopen/network.py](https://app.codecov.io/gh/christiansandberg/canopen/pull/534?src=pr&el=tree&filepath=canopen%2Fnetwork.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Christian+Sandberg#diff-Y2Fub3Blbi9uZXR3b3JrLnB5) | `91.41% <100.00%> (-0.06%)` | :arrow_down: | | [canopen/nmt.py](https://app.codecov.io/gh/christiansandberg/canopen/pull/534?src=pr&el=tree&filepath=canopen%2Fnmt.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Christian+Sandberg#diff-Y2Fub3Blbi9ubXQucHk=) | `91.85% <60.00%> (-1.39%)` | :arrow_down: |