mabderrahim commited on
Commit
016c217
1 Parent(s): 1372234

Chnage distance unit from m to meter as requested in the issue #93

Browse files
Files changed (1) hide show
  1. src/utils.py +2 -2
src/utils.py CHANGED
@@ -141,7 +141,7 @@ def format_energy_eq_physical_activity(energy: Quantity) -> tuple[PhysicalActivi
141
 
142
  walking_eq = energy / WALKING_ENERGY_EQ
143
  if walking_eq < q("1 km"):
144
- walking_eq = walking_eq.to("m")
145
  return PhysicalActivity.WALKING, walking_eq
146
 
147
 
@@ -149,7 +149,7 @@ def format_energy_eq_electric_vehicle(energy: Quantity) -> Quantity:
149
  energy = energy.to("kWh")
150
  ev_eq = energy / EV_ENERGY_EQ
151
  if ev_eq < q("1 km"):
152
- ev_eq = ev_eq.to("m")
153
  return ev_eq
154
 
155
 
 
141
 
142
  walking_eq = energy / WALKING_ENERGY_EQ
143
  if walking_eq < q("1 km"):
144
+ walking_eq = walking_eq.to("meter")
145
  return PhysicalActivity.WALKING, walking_eq
146
 
147
 
 
149
  energy = energy.to("kWh")
150
  ev_eq = energy / EV_ENERGY_EQ
151
  if ev_eq < q("1 km"):
152
+ ev_eq = ev_eq.to("meter")
153
  return ev_eq
154
 
155