Introduce UnitOfFrequency enum (#83289)

pull/83385/head
epenet 2022-12-05 20:03:47 +01:00 committed by GitHub
parent 6295cf3dc4
commit 8fdf35b80a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -619,11 +619,25 @@ LENGTH_YARD: Final = "yd"
LENGTH_MILES: Final = "mi"
"""Deprecated: please use UnitOfLength.MILES."""
# Frequency units
class UnitOfFrequency(StrEnum):
"""Frequency units."""
HERTZ = "Hz"
KILOHERTZ = "kHz"
MEGAHERTZ = "MHz"
GIGAHERTZ = "GHz"
FREQUENCY_HERTZ: Final = "Hz"
"""Deprecated: please use UnitOfFrequency.HERTZ"""
FREQUENCY_KILOHERTZ: Final = "kHz"
"""Deprecated: please use UnitOfFrequency.KILOHERTZ"""
FREQUENCY_MEGAHERTZ: Final = "MHz"
"""Deprecated: please use UnitOfFrequency.MEGAHERTZ"""
FREQUENCY_GIGAHERTZ: Final = "GHz"
"""Deprecated: please use UnitOfFrequency.GIGAHERTZ"""
# Pressure units