OpenCyphal / pycyphal

Python implementation of the Cyphal protocol stack.
https://pycyphal.readthedocs.io/
MIT License
117 stars 105 forks source link

Add ability to spoof media-layer frames #260

Closed silverv closed 1 year ago

silverv commented 1 year ago

I have since gotten distracted with fixing Pycyphal itself and I should come back to the real issue that this pull request is actually done and we should merge it.

silverv commented 1 year ago

But that comes after I revert all the fixes that didn't manage to fix Pycyphal and didn't manage to make the life of a developer easier.

pavel-kirienko commented 1 year ago

The MyPy problem was caused by a regression in it: https://github.com/python/mypy/issues/13627. I fixed it by upgrading to the latest MyPy; this necessitated some minor additional changes throughout (see the latest commit).

There was a type error and two logical errors in spoof_frames which I fixed. The unit test needs to be updated per my request above and also the own flag needs to be checked in the test.