Validating Enum doc-strings?
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- documentation
Research direction
Start with the numpydoc validation warnings for b_asic.quantization.Quantization.ROUNDING and compare the shown Enum member docstring with the validation rules. Check whether Enum member docstrings are supported and whether the warning is expected; done means the supported formatting or required validation behavior is clearly established.
Written by the indexing model from the issue text.
Description
Not sure if it is just me, but I get the following warning when validating an Enum:
WARNING: [numpydoc] Validation warnings while processing docstring for 'b_asic.quantization.Quantization.ROUNDING':
GL01: Docstring text (summary) should start in the line immediately after the opening quotes (not in the same line, or leaving a blank line in between)
GL02: Closing quotes should be placed in the line after the last text in the docstring (do not close the quotes in the same line as the text, or leave a blank line between the last text and the quotes)
The code looks like:
class Quantization(Enum):
"""Quantization types."""
ROUNDING = 1
"""
Standard two's complement rounding, i.e, tie rounds towards infinity.
"""
Is there a more correct way to document enums or is this just something that is not completely covered in the validation?
Edit: I should mention that I have tried several different ways to format the doc-string as well.
- Dominant language
- Python
- Stars
- 354
- Forks
- 185
- Avg merge
- 4m
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from numpy/numpydoc
-
Don't require ``RT01`` for propertiesMay be free again @Nani-2007-code claimed this 30 days ago, and no pull request is open. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 57/100
-
DOC: Version link overflowing on navbarMay be free again @swoyer2 claimed this 52 days ago, and no pull request is open. Open
Difficulty 3/5 1-2 days Newbie friendliness 52/100
-
needs-decision
Difficulty 5/5 Over a week Newbie friendliness 35/100
Similar issues
-
00 - Bug component: numpy.linalg
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
521xueweihan/HelloGitHub#4543 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
emeryberger/CSrankings#15700 ·
Maintainers usually reply within 2 days
-
Bug | 工作不正常 Triage | 待检查
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
OneDragon-Anything/ZenlessZoneZero-OneDragon#3084 ·
Maintainers usually reply within 1 day
-
Task select patterns with uppercase letters never matchPossibly taken @manobhisriram claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day