Skip to content

Commit

Permalink
fix: revert back to | instead of typing.Optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Labretx committed Jul 28, 2024
1 parent 4f4e08a commit 46fcc9b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions spike_bot/bot/spike.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import typing as t
from typing import Any

import lightbulb

from spike_bot.database import DatabaseManager


class Spike(lightbulb.BotApp):
dbm: t.Optional[DatabaseManager]
dbm: DatabaseManager | None

def __init__(
self,
token: str,
dbm: DatabaseManager | None = None,
**kwargs: t.Any,
**kwargs: Any,
) -> None:
self.dbm = dbm
super().__init__(
Expand Down
6 changes: 2 additions & 4 deletions spike_bot/database/database_manager.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import typing as t

import asyncpg

from spike_bot.database.queries import table_creation_queries


class DatabaseManager:
connection_pool: t.Optional[asyncpg.Pool]
connection_pool: asyncpg.Pool | None

def __init__(self, connection_pool: t.Optional[asyncpg.Pool]) -> None:
def __init__(self, connection_pool: asyncpg.Pool | None) -> None:
self.connection_pool = connection_pool

async def create_tables(self) -> None:
Expand Down

0 comments on commit 46fcc9b

Please sign in to comment.