use type alias type to remove ambiguity of where types go
This commit is contained in:
parent
a1a185e4eb
commit
3999b615a6
@ -26,6 +26,7 @@ from typing import (
|
||||
|
||||
from typing_extensions import (
|
||||
Protocol,
|
||||
TypeAliasType,
|
||||
TypedDict,
|
||||
TypeVar,
|
||||
TypeVarTuple,
|
||||
@ -1907,7 +1908,11 @@ LambdaOrState = LambdaEventCallback[Unpack[ARGS]] | EventCallback[Unpack[ARGS]]
|
||||
|
||||
ItemOrList = V | List[V]
|
||||
|
||||
IndividualEventType = LambdaOrState[Unpack[ARGS]] | EventSpec | EventHandler | Var[Any]
|
||||
BASIC_EVENT_TYPES = TypeAliasType(
|
||||
"BASIC_EVENT_TYPES", EventSpec | EventHandler | Var[Any], type_params=()
|
||||
)
|
||||
|
||||
IndividualEventType = LambdaOrState[Unpack[ARGS]] | BASIC_EVENT_TYPES
|
||||
EventType = ItemOrList[IndividualEventType[Unpack[ARGS]]]
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user