util.todict process DefaultInt to a dictionary instead of a int
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 358
- Forks
- 101
- PR merge metrics
- No merged PRs in 30d
Description
Not sure if this is a bug, or expected behavior.
When executing the example exapp
> knack_test.py hello world
Are you sure you want to perform this operation? (y/n): y
[
"hello",
"world",
{
"isDefault": true
},
null
]
Here the argument myarg is returned and during the processing of the command return. Then, util.todict is used to process it and since the real type of myarg is DefaultInt the int default value of 100 is not printed in the screen but instead the dictionary { "isDefault": true }, which comes from myarg.__dict__
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 with the examples/exapp command and the util.todict processing described in the report, then trace how a DefaultInt value is serialized in the command result. Confirm whether the intended output is the integer default value of 100 rather than the {"isDefault": true} dictionary, and add coverage for the observed case. Done when the example produces the agreed representation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100