Skip to content

Commit

Permalink
Switch boolean config settings to BooleanAttribute
Browse files Browse the repository at this point in the history
ValidatedAttribute with `bool` as parse method are deprecated in Sopel 8
  • Loading branch information
dgw authored and RustyBower committed Nov 2, 2023
1 parent 1e76f70 commit cdfb01f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sopel_modules/weather/weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import pytz

from sopel.config.types import NO_DEFAULT, ChoiceAttribute, StaticSection, ValidatedAttribute
from sopel.config.types import NO_DEFAULT, BooleanAttribute, ChoiceAttribute, StaticSection, ValidatedAttribute
from sopel.plugin import commands, example, NOLIMIT
from sopel.tools import Identifier
from sopel.tools.time import format_time
Expand Down Expand Up @@ -41,8 +41,8 @@ class WeatherSection(StaticSection):
geocoords_api_key = ValidatedAttribute('geocoords_api_key', str, default='')
weather_provider = ChoiceAttribute('weather_provider', WEATHER_PROVIDERS, default=NO_DEFAULT)
weather_api_key = ValidatedAttribute('weather_api_key', str, default='')
sunrise_sunset = ValidatedAttribute('sunrise_sunset', bool, default=False)
nick_lookup = ValidatedAttribute('nick_lookup', bool, default=True)
sunrise_sunset = BooleanAttribute('sunrise_sunset', default=False)
nick_lookup = BooleanAttribute('nick_lookup', default=True)


def setup(bot):
Expand Down

0 comments on commit cdfb01f

Please sign in to comment.