google / google/openhtf

PERCENT double declaration

Open
#1,250 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
722
Forks
237
Avg merge
11h 31m
Merged PRs (30d)
4

Description

## Issue
In openhtf.units L3648C1-L3651C26, PERCENT is defined [twice](
https://github.com/google/openhtf/blob/22ef3a04774c157ea1c2ba5712e83e71e33d266e/openhtf/util/units.py#L3648C1-L3651C26):

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.