Skip to content

PERCENT double declaration #1250

@simonecontorno

Description

@simonecontorno

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions