Implementation of __repr__ for custom types should be updated to use `__module__` and `__qualname__`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 128
- Forks
- 110
- Avg merge
- 5d 14h
- Merged PRs (30d)
- 10
Description
Description of issue
Best practice for implementing __repr__ for custom types is to use
__module__ and __qualname__.
By including __module__ in __repr__, eval(repr(CustomType()))
can be called by importing nimi-python module as import nixyz; which is
consistent with recommended import style of nimi-python.
Related issue for making similar change in nifake: #1444.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the custom-type repr implementations across the nimi-python source and identify whether the same pattern is repeated across instrument APIs. Update the representations to use module and qualname, then verify that eval(repr(CustomType())) works when the module is imported as nixyz.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend-api-design
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100