summaryrefslogtreecommitdiff
path: root/conversion_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'conversion_utils.py')
-rw-r--r--conversion_utils.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/conversion_utils.py b/conversion_utils.py
index 4326840..684edc0 100644
--- a/conversion_utils.py
+++ b/conversion_utils.py
@@ -86,9 +86,7 @@ conversion_catalog = {
lambda c: c * 1.8 + 32.0,
"°F",
),
- "Celsius": Converter(
- "Celsius", "temperature", lambda c: c, lambda c: c, "°C"
- ),
+ "Celsius": Converter("Celsius", "temperature", lambda c: c, lambda c: c, "°C"),
"Kelvin": Converter(
"Kelvin",
"temperature",
@@ -109,9 +107,7 @@ def convert(magnitude: Number, from_thing: str, to_thing: str) -> float:
return _convert(magnitude, src, dst)
-def _convert(
- magnitude: Number, from_unit: Converter, to_unit: Converter
-) -> float:
+def _convert(magnitude: Number, from_unit: Converter, to_unit: Converter) -> float:
canonical = from_unit.to_canonical(magnitude)
converted = to_unit.from_canonical(canonical)
return float(converted)