Skip to content

Commit

Permalink
fix: make thing do work
Browse files Browse the repository at this point in the history
  • Loading branch information
ooliver1 committed Oct 22, 2022
1 parent 5aead6a commit 113b37a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 6 additions & 4 deletions mafic/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,24 @@

from logging import getLogger
from random import choice
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Generic, TypeVar

from .__libraries import Client
from .node import Node

if TYPE_CHECKING:
from typing import ClassVar

from aiohttp import ClientSession

from .__libraries import Client

ClientT = TypeVar("ClientT", bound=Client)


_log = getLogger(__name__)


class NodePool:
class NodePool(Generic[ClientT]):
__slots__ = ()
_nodes: ClassVar[dict[str, Node]] = {}

Expand All @@ -35,7 +37,7 @@ async def create_node(
port: int,
label: str,
password: str,
client: Client,
client: ClientT,
secure: bool = False,
heartbeat: int = 30,
timeout: float = 10,
Expand Down
4 changes: 1 addition & 3 deletions mafic/typings/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

from __future__ import annotations

from typing import TYPE_CHECKING, TypedDict, Union
from typing import TYPE_CHECKING, Literal, TypedDict, Union

if TYPE_CHECKING:
from typing import Literal

from .misc import FriendlyException

__all__ = (
Expand Down

0 comments on commit 113b37a

Please sign in to comment.