Skip to content

Commit

Permalink
Remove dependency on Sopel's built-in units plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
dgw authored and RustyBower committed Nov 2, 2023
1 parent deebd3a commit 1e76f70
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sopel_modules/weather/weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

from sopel.config.types import NO_DEFAULT, ChoiceAttribute, StaticSection, ValidatedAttribute
from sopel.plugin import commands, example, NOLIMIT
from sopel.modules.units import c_to_f
from sopel.tools import Identifier
from sopel.tools.time import format_time

Expand Down Expand Up @@ -90,7 +89,7 @@ def get_temp(temp):
temp = float(temp)
except (KeyError, TypeError, ValueError):
return 'unknown'
return u'%d\u00B0C (%d\u00B0F)' % (round(temp), round(c_to_f(temp)))
return u'%d\u00B0C (%d\u00B0F)' % (round(temp), round(1.8 * temp + 32))


def get_humidity(humidity):
Expand Down

0 comments on commit 1e76f70

Please sign in to comment.