Implementation of __repr__ for custom types in nifake should be updated to use `__module__` and `__qualname__`
Open
Nobody has claimed this yet.
ni-internal
- 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 nifake as import nifake; which is
consistent with recommended import style of nimi-python.
Related issue for making similar change in released modules: #1443
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
Inspect the custom type implementations in nifake and compare the related released-module change described in issue #1443. Update the representations to use module and qualname; done means eval(repr(CustomType())) works when nifake is imported as import nifake.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100