Weather: remove unused _weatherSymbol helper

(cherry picked from commit e04f6c5b2d9095977f56b586de258c3a56bc5bef)
This commit is contained in:
James Lu 2018-02-04 11:23:02 -08:00
parent d3e375b1d0
commit cb94985943

View File

@ -169,33 +169,6 @@ class Weather(callbacks.Plugin):
# INTERNAL WEATHER HELPERS #
############################
def _weatherSymbol(self, code):
"""Return a unicode symbol based on weather status."""
table = {'partlycloudy': '~☁',
'cloudy': '',
'tstorms': '',
'sunny': '',
'snow': '',
'sleet': '',
'rain': '',
'mostlysunny': '~☀',
'mostlycloudy': '~☁',
'hazy': '',
'fog': '',
'flurries': '',
'clear': '',
'chanceflurries': '?❄',
'chancerain': '?☔',
'chancesleet': '?❄',
'chancesnow': '?❄',
'chancetstorms': '?☔'}
# return symbol from table.
try:
return table[code]
except KeyError:
return "unknown"
def _temp(self, channel, f, c=None):
"""Returns a colored string based on the temperature."""
@ -584,7 +557,6 @@ class Weather(callbacks.Plugin):
high = self._temp(channel, forecastday['high']['fahrenheit'])
low = self._temp(channel, forecastday['low']['fahrenheit'])
tmpdict = {'day': forecastday['date']['weekday_short'],
'symbol': self._weatherSymbol(forecastday['icon']),
'text': forecastday['conditions'],
'low': low,
'high': high}