Skip to content

Commit

Permalink
Fix return types
Browse files Browse the repository at this point in the history
Signed-off-by: Eiko Wagenknecht <[email protected]>
  • Loading branch information
eikowagenknecht committed Oct 15, 2023
1 parent 9878bf6 commit 6035c1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/lootscraper/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import logging
from datetime import datetime, timedelta, timezone
from pathlib import Path
from typing import TYPE_CHECKING, Any
from typing import TYPE_CHECKING, Any, Self

import sqlalchemy as sa
from alembic import command
Expand Down Expand Up @@ -282,7 +282,7 @@ def __init__(self: LootDatabase, echo: bool = False) -> None:
self.Session = scoped_session(session_factory)
# TODO: Can this be changed with SQLAlchemy 2.0 and the removal of threaded execution?

def __enter__(self: LootDatabase) -> LootDatabase:
def __enter__(self: LootDatabase) -> Self:
return self

def __exit__(
Expand Down
4 changes: 2 additions & 2 deletions src/lootscraper/telegrambot.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import traceback
from datetime import datetime, timedelta, timezone
from http.client import RemoteDisconnected
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Self

import humanize
import sqlalchemy as sa
Expand Down Expand Up @@ -101,7 +101,7 @@ def __init__(
self.Session = scoped_session
self.application: Application | None = None # type: ignore

async def __aenter__(self: TelegramBot) -> TelegramBot:
async def __aenter__(self: TelegramBot) -> Self:
try:
await self.start()
except TelegramError:
Expand Down

0 comments on commit 6035c1c

Please sign in to comment.