From 166b3c8a76128b83f7682aa8da6875a49662472f Mon Sep 17 00:00:00 2001 From: Florian Strzelecki Date: Fri, 27 Sep 2019 11:08:12 +0200 Subject: [PATCH] clock: remove obsolete config options --- sopel/modules/clock.py | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/sopel/modules/clock.py b/sopel/modules/clock.py index acd5494bee..333b19b649 100644 --- a/sopel/modules/clock.py +++ b/sopel/modules/clock.py @@ -10,49 +10,15 @@ from __future__ import unicode_literals, absolute_import, print_function, division from sopel import module, tools -from sopel.config.types import StaticSection, ValidatedAttribute from sopel.tools.time import ( format_time, get_channel_timezone, get_nick_timezone, get_timezone, - validate_format, validate_timezone ) -class TimeSection(StaticSection): - tz = ValidatedAttribute( - 'tz', - parse=validate_timezone, - serialize=validate_timezone, - default='UTC') - """Default time zone (see https://sopel.chat/tz)""" - time_format = ValidatedAttribute( - 'time_format', - parse=validate_format, - default='%Y-%m-%d - %T%Z') - """Default time format (see http://strftime.net)""" - - -def configure(config): - """ - | name | example | purpose | - | ---- | ------- | ------- | - | tz | America/Chicago | Preferred time zone (see ); defaults to UTC | - | time\\_format | %Y-%m-%d - %T%Z | Preferred time format (see ) | - """ - config.define_section('clock', TimeSection) - config.clock.configure_setting( - 'tz', 'Preferred time zone (https://sopel.chat/tz)') - config.clock.configure_setting( - 'time_format', 'Preferred time format (http://strftime.net)') - - -def setup(bot): - bot.config.define_section('clock', TimeSection) - - @module.commands('t', 'time') @module.example('.t America/New_York') @module.example('.t Exirel')