2023-05-26 12:31:24 -07:00
|
|
|
from enum import Enum
|
|
|
|
|
|
|
|
|
|
|
|
class UnitLength(str, Enum):
|
|
|
|
"""The valid types of length units.""" # noqa: E501
|
|
|
|
|
|
|
|
"""# Centimetres <https://en.wikipedia.org/wiki/Centimetre> """ # noqa: E501
|
2023-07-31 12:50:30 -07:00
|
|
|
CM = "cm"
|
2023-05-26 12:31:24 -07:00
|
|
|
"""# Feet <https://en.wikipedia.org/wiki/Foot_(unit)> """ # noqa: E501
|
2023-07-31 12:50:30 -07:00
|
|
|
FT = "ft"
|
2023-05-26 12:31:24 -07:00
|
|
|
"""# Inches <https://en.wikipedia.org/wiki/Inch> """ # noqa: E501
|
2023-07-31 12:50:30 -07:00
|
|
|
IN = "in"
|
2023-05-26 12:31:24 -07:00
|
|
|
"""# Metres <https://en.wikipedia.org/wiki/Metre> """ # noqa: E501
|
2023-07-31 12:50:30 -07:00
|
|
|
M = "m"
|
2023-05-26 12:31:24 -07:00
|
|
|
"""# Millimetres <https://en.wikipedia.org/wiki/Millimetre> """ # noqa: E501
|
2023-07-31 12:50:30 -07:00
|
|
|
MM = "mm"
|
2023-05-26 12:31:24 -07:00
|
|
|
"""# Yards <https://en.wikipedia.org/wiki/Yard> """ # noqa: E501
|
2023-07-31 12:50:30 -07:00
|
|
|
YD = "yd"
|
2023-05-26 12:31:24 -07:00
|
|
|
|
|
|
|
def __str__(self) -> str:
|
|
|
|
return str(self.value)
|