OpenCyphal / pycyphal

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

Add comment explaining how to properly import types #338

Open maksimdrachov opened 2 months ago

maksimdrachov commented 2 months ago

sirius_cyber_corp example shows how to work with types in the top directory, however if the type is located in a folder, one has to make sure to import the type as follows:

import top_folder.sub_folder.some_type # import like this
top_folder.sub_folder.some_type # use like this

# This won't work
import top_folder
top_folder.sub_folder.some_type # This will give an error
image