mirror of
https://github.com/jlu5/SupyPlugins.git
synced 2025-05-02 00:11:06 -05:00
Weather: remove unused _weatherSymbol helper
(cherry picked from commit e04f6c5b2d9095977f56b586de258c3a56bc5bef)
This commit is contained in:
parent
d3e375b1d0
commit
cb94985943
@ -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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user