Skip to content

Conversation

@maksimdrachov
Copy link
Member

This fixes the failing unit test tests/cmd/execute_command.py.

The issue arose due to this implemented in public_regulated_data_types:

OpenCyphal/public_regulated_data_types@ec27883

maksimdrachov and others added 2 commits March 13, 2024 16:01
Question:

Is there a way to this:

```
yakut call 125 435:uavcan.node.ExecuteCommand '{command: COMMAND_RESTART, parameter: "firmware.bin"}'
```


Instead of this:

```
yakut call 125 435:uavcan.node.ExecuteCommand '{command: 65533, parameter: "firmware.bin"}'
```

[Relevant forum
question](https://forum.opencyphal.org/t/yakut-file-commands/1815/2)

---------

Co-authored-by: Pavel Kirienko <pavel.kirienko@gmail.com>
@maksimdrachov maksimdrachov changed the title Fix test Fix execute_command test Jul 25, 2024
@maksimdrachov
Copy link
Member Author

Ok, the same errors show up on my local setup:

image

@maksimdrachov
Copy link
Member Author

@pavel-kirienko

Can you weight in on why this is happening?

I checked .venv3.12/lib/python3.12/site-packages/pycyphal/transport/__init__.py, it has the following line:

from ._transfer import TransferFrom as TransferFrom
image

@maksimdrachov
Copy link
Member Author

Highlighted part is where the error occurs:

image

@pavel-kirienko
Copy link
Member

The MyPy errors could be related to this recent change in PyCyphal: OpenCyphal/pycyphal#343

PyCyphal imports were considered missing by MyPy until we added the py.typed label; now it's trying to parse PyCyphal but failing for some reason. We could simply force it to shut up by adding to setup.cfg:

 [mypy-pycyphal.*]
 ignore_missing_imports = True
+ignore_errors = True

But this is not a good solution for obvious reasons. However, it is often the case with MyPy that no solution is a good one.

@maksimdrachov I've been staging minor changes on the dev branch to avoid publishing releases too often; consider changing the merge target to that branch instead.

@maksimdrachov maksimdrachov changed the base branch from main to dev August 31, 2024 17:37
@pavel-kirienko pavel-kirienko merged commit 833a52d into dev May 12, 2025
0 of 6 checks passed
@pavel-kirienko pavel-kirienko deleted the fix-test branch May 12, 2025 15:29
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.

3 participants