From cb9498594313e8e8287a6df78d4c1879c87c79a3 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sun, 4 Feb 2018 11:23:02 -0800 Subject: [PATCH] Weather: remove unused _weatherSymbol helper (cherry picked from commit e04f6c5b2d9095977f56b586de258c3a56bc5bef) --- Weather/plugin.py | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/Weather/plugin.py b/Weather/plugin.py index 96490f0..be44cf4 100644 --- a/Weather/plugin.py +++ b/Weather/plugin.py @@ -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}