2023-05-26 12:31:24 -07:00
|
|
|
from enum import Enum
|
|
|
|
|
|
|
|
|
|
|
|
class UnitMass(str, Enum):
|
2023-11-27 16:01:20 -08:00
|
|
|
"""The valid types of mass units.""" # noqa: E501
|
|
|
|
|
|
|
|
"""# Grams <https://en.wikipedia.org/wiki/Gram> """ # noqa: E501
|
|
|
|
G = "g"
|
|
|
|
"""# Kilograms <https://en.wikipedia.org/wiki/Kilogram> """ # noqa: E501
|
|
|
|
KG = "kg"
|
|
|
|
"""# Pounds <https://en.wikipedia.org/wiki/Pound_(mass)> """ # noqa: E501
|
|
|
|
LB = "lb"
|
|
|
|
|
|
|
|
def __str__(self) -> str:
|
|
|
|
return str(self.value)
|