fallback switch
Some checks failed
CI / OS ubuntu-latest, Python 3.10 (push) Has been cancelled
CI / OS ubuntu-latest, Python 3.11 (push) Has been cancelled
CI / OS ubuntu-latest, Python 3.12 (push) Has been cancelled
CI / OS ubuntu-latest, Python 3.13 (push) Has been cancelled
CI / OS ubuntu-latest, Python 3.9 (push) Has been cancelled
CI / OS windows-latest, Python 3.10 (push) Has been cancelled
CI / OS windows-latest, Python 3.11 (push) Has been cancelled
CI / OS windows-latest, Python 3.12 (push) Has been cancelled
CI / OS windows-latest, Python 3.13 (push) Has been cancelled
CI / OS windows-latest, Python 3.9 (push) Has been cancelled
CI / create_wheel_and_sdist (push) Has been cancelled

This commit is contained in:
wrapper 2026-04-07 23:28:33 +07:00
parent 0a4628935b
commit 486c553d65

View file

@ -830,13 +830,13 @@ class Switch(Construct[ParsedType, BuildTypes]):
cases: dict[t.Any, Construct[SwitchParsedType, SwitchBuildTypes]],
default: Construct[SwitchDefaultParsedType, SwitchDefaultBuildTypes],
) -> Switch[SwitchParsedType | SwitchDefaultParsedType, SwitchBuildTypes | SwitchDefaultBuildTypes]: ...
# @t.overload
# def __new__(
# cls: "type[Switch[t.Any, t.Any]]",
# keyfunc: ConstantOrContextLambda[t.Any],
# cases: t.Dict[t.Any, Construct[t.Any, t.Any]],
# default: t.Optional[Construct[t.Any, t.Any]] = ...,
# ) -> Switch[t.Any, t.Any]: ...
@t.overload
def __new__(
cls: "type[Switch[t.Any, t.Any]]",
keyfunc: ConstantOrContextLambda[SwitchType],
cases: dict[t.Any, Construct[t.Any, t.Any]],
default: Construct[t.Any, t.Any] | None = ...,
) -> Switch[t.Any, t.Any]: ...
class StopIf(Construct[None, None]):
condfunc: ConstantOrContextLambda[bool]