Skip to content

Commit

Permalink
fix: support 3.8 again lol
Browse files Browse the repository at this point in the history
  • Loading branch information
ooliver1 committed Aug 30, 2023
1 parent 89204ac commit 8b4bd4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion mafic/pool.py
Expand Up @@ -325,7 +325,9 @@ def get_node(
actual_strategies = [strategies] if callable(strategies) else strategies

# It is a classproperty.
nodes = cast(list[Node[ClientT]], cls.nodes) # pyright: ignore # noqa: PGH003
# fmt: off
nodes = cast("list[Node[ClientT]]", cls.nodes) # pyright: ignore # noqa: PGH003, E501
# fmt: on

for strategy in actual_strategies:
if isinstance(strategy, Strategy):
Expand Down
4 changes: 2 additions & 2 deletions mafic/utils/classproperty.py
Expand Up @@ -3,7 +3,7 @@

from __future__ import annotations

from typing import TYPE_CHECKING, Generic, TypeVar, cast
from typing import TYPE_CHECKING, Generic, TypeVar

if TYPE_CHECKING:
from collections.abc import Callable
Expand All @@ -22,7 +22,7 @@ def __init__(self, fget: classmethod[T, ..., R] | staticmethod[..., R]) -> None:

def __get__(self, instance: T, owner: type[T] | None = None) -> R:
if owner is None:
owner = cast(type[T], type(instance))
owner = type(instance)
return self.fget.__get__(instance, owner)()


Expand Down

0 comments on commit 8b4bd4a

Please sign in to comment.