PERCENT double declaration
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 60/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- python
- Domain
- testing-qa
Research direction
Openhtf/util/units.py around lines 3648–3651 contains the duplicate PERCENT declarations; start by reading that block. Rename the second descriptor as described so the percent and pct units remain accessible under distinct names, then verify both entries are present in ALL_UNITS.
Written by the indexing model from the issue text.
Description
Issue
In openhtf.units L3648C1-L3651C26, PERCENT is defined twice:
PERCENT = UnitDescriptor('percent', 'P1', '%')
ALL_UNITS.append(PERCENT)
PERCENT = UnitDescriptor('percent', 'P1', 'pct')
ALL_UNITS.append(PERCENT)
Because the second assignment overwrites the first, units.PERCENT always resolves to "pct", and the "%" unit is inaccessible.
Solution
Rename PERCENT "pct" --> PERCENT_PCT
- Dominant language
- Python
- Stars
- 723
- Forks
- 238
- Avg merge
- 11h 31m
- Merged PRs (30d)
- 4
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.
More from google/openhtf
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
-
documentation
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100