OpenCyphal / OpenCyphal/pycyphal

Add comment explaining how to properly import types

Open
#338 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
142
Forks
110
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Find the sirius_cyber_corp example and inspect how its type-related imports are documented. Add a comment explaining the required nested import and usage pattern, including why importing only top_folder does not work; done means the example clearly communicates this distinction.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.