Python type system experiments.
Push the envelope as far as you can! ...and then give up and use cast(), because we don't have applicative functors or higher kinded types
This commit is contained in:
@@ -3,7 +3,7 @@ from typing import NamedTuple
|
||||
from unittest.mock import MagicMock
|
||||
from gears import Gear
|
||||
from gears.connections import connect
|
||||
from gears.effect import effect_of, effect_of_2
|
||||
from gears.effect import effect_of
|
||||
|
||||
|
||||
def test_get_set():
|
||||
@@ -35,7 +35,7 @@ def test_effect_of_2():
|
||||
|
||||
last_arg: tuple[str, int] | None = None
|
||||
|
||||
@effect_of_2(g1, g2)
|
||||
@effect_of(g1, g2)
|
||||
def value_changed(v1: str, v2: int):
|
||||
nonlocal last_arg
|
||||
last_arg = (v1, v2)
|
||||
|
||||
Reference in New Issue
Block a user