Reformatting

pull/132/head
bobloy 4 years ago
parent 3d64bcf768
commit 12d0b2944e

@ -2,8 +2,8 @@ from datetime import datetime
from typing import TYPE_CHECKING from typing import TYPE_CHECKING
from apscheduler.triggers.cron import CronTrigger from apscheduler.triggers.cron import CronTrigger
from discord.ext.commands import BadArgument, Converter
from dateutil import parser from dateutil import parser
from discord.ext.commands import BadArgument, Converter
from fifo.timezones import assemble_timezones from fifo.timezones import assemble_timezones
@ -11,6 +11,7 @@ if TYPE_CHECKING:
DatetimeConverter = datetime DatetimeConverter = datetime
CronConverter = str CronConverter = str
else: else:
class DatetimeConverter(Converter): class DatetimeConverter(Converter):
async def convert(self, ctx, argument) -> datetime: async def convert(self, ctx, argument) -> datetime:
dt = parser.parse(argument, fuzzy=True, tzinfos=assemble_timezones()) dt = parser.parse(argument, fuzzy=True, tzinfos=assemble_timezones())
@ -25,4 +26,4 @@ else:
except ValueError: except ValueError:
raise BadArgument() raise BadArgument()
return argument return argument

@ -9,7 +9,7 @@ from apscheduler.schedulers.asyncio import AsyncIOScheduler
from apscheduler.schedulers.base import STATE_PAUSED, STATE_RUNNING from apscheduler.schedulers.base import STATE_PAUSED, STATE_RUNNING
from redbot.core import Config, checks, commands from redbot.core import Config, checks, commands
from redbot.core.bot import Red from redbot.core.bot import Red
from redbot.core.commands import DictConverter, TimedeltaConverter from redbot.core.commands import TimedeltaConverter
from .datetime_cron_converters import CronConverter, DatetimeConverter from .datetime_cron_converters import CronConverter, DatetimeConverter
from .task import Task from .task import Task

@ -3,7 +3,6 @@ import base64
import logging import logging
import pickle import pickle
from datetime import datetime from datetime import datetime
from time import sleep
from typing import Tuple, Union from typing import Tuple, Union
from apscheduler.job import Job from apscheduler.job import Job

@ -5,9 +5,9 @@ from typing import Dict, List, Union
import discord import discord
from apscheduler.triggers.base import BaseTrigger from apscheduler.triggers.base import BaseTrigger
from apscheduler.triggers.combining import OrTrigger from apscheduler.triggers.combining import OrTrigger
from apscheduler.triggers.cron import CronTrigger
from apscheduler.triggers.date import DateTrigger from apscheduler.triggers.date import DateTrigger
from apscheduler.triggers.interval import IntervalTrigger from apscheduler.triggers.interval import IntervalTrigger
from apscheduler.triggers.cron import CronTrigger
from discord.utils import time_snowflake from discord.utils import time_snowflake
from redbot.core import Config, commands from redbot.core import Config, commands
from redbot.core.bot import Red from redbot.core.bot import Red

Loading…
Cancel
Save