sphinx-doc / sphinx-doc/sphinx-argparse
Option to display None default?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 38
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
If it does not conflict with how argparse works, I think it would be useful to have an option that allows explicitly displaying when the developer has specified that an argument defaults to None internally if not provided. This is useful for arguments where the default case shares some, but not all, functionality with another case that may appear the same to the use but actually isn't. E.g., in my project None and 0 have very similar, but non-identical behavior, as None ensures the value is ignored, while 0 specifies to consider it, but treat it as 0, which doesn't do exactly the same thing.
Contributor guide
No contributing guide indexed for this repository
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 tracing how the extension renders argparse options and defaults, then compare that behavior with argparse's handling of explicitly specified None defaults. Define how an option should distinguish an explicit None from other defaults without conflicting with argparse, and verify the None-versus-0 example as the done criterion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100