Remove TYPE_CHECKING
This commit is contained in:
parent
759fe011d5
commit
3782cda364
3 changed files with 5 additions and 14 deletions
|
@ -1,16 +1,13 @@
|
||||||
"""JARVIS ban tasks."""
|
"""JARVIS ban tasks."""
|
||||||
import asyncio
|
import asyncio
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from typing import TYPE_CHECKING
|
|
||||||
|
|
||||||
|
from dis_snek import Snake
|
||||||
from jarvis_core.db import q
|
from jarvis_core.db import q
|
||||||
from jarvis_core.db.models import Ban, Unban
|
from jarvis_core.db.models import Ban, Unban
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
from dis_snek import Snake
|
|
||||||
|
|
||||||
|
async def unban(bot: Snake) -> None:
|
||||||
async def unban(bot: "Snake") -> None:
|
|
||||||
"""
|
"""
|
||||||
Unban users when ban expires.
|
Unban users when ban expires.
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,14 @@
|
||||||
"""JARVIS reminders."""
|
"""JARVIS reminders."""
|
||||||
import asyncio
|
import asyncio
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from typing import TYPE_CHECKING
|
|
||||||
|
|
||||||
|
from dis_snek import Snake
|
||||||
from jarvis_core.db import q
|
from jarvis_core.db import q
|
||||||
from jarvis_core.db.models import Reminder
|
from jarvis_core.db.models import Reminder
|
||||||
from jarvis_core.util import build_embed
|
from jarvis_core.util import build_embed
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
from dis_snek import Snake
|
|
||||||
|
|
||||||
|
async def remind(bot: Snake) -> None:
|
||||||
async def remind(bot: "Snake") -> None:
|
|
||||||
"""
|
"""
|
||||||
Run reminders in the background.
|
Run reminders in the background.
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,14 @@
|
||||||
"""JARVIS Twitter sync."""
|
"""JARVIS Twitter sync."""
|
||||||
import asyncio
|
import asyncio
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from typing import TYPE_CHECKING
|
|
||||||
|
|
||||||
import tweepy
|
import tweepy
|
||||||
|
from dis_snek import Snake
|
||||||
from jarvis_core.db import q
|
from jarvis_core.db import q
|
||||||
from jarvis_core.db.models import TwitterAccount, TwitterFollow
|
from jarvis_core.db.models import TwitterAccount, TwitterFollow
|
||||||
|
|
||||||
from jarvis_tasks.config import TaskConfig
|
from jarvis_tasks.config import TaskConfig
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
from dis_snek import Snake
|
|
||||||
|
|
||||||
config = TaskConfig.from_yaml()
|
config = TaskConfig.from_yaml()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue