Skip to content

Commit

Permalink
✏️ fix typing typo
Browse files Browse the repository at this point in the history
  • Loading branch information
AzideCupric committed Aug 1, 2024
1 parent 2491f40 commit 38dd0d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions nonebot_bison/platform/bilibili/fsm.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ class StateGraph(Generic[TState, TEvent, TAddon], TypedDict):

class Transition(NamedTuple):
action: Action
to: StrEnum
to: Any
conditions: AbstractSet[Condition] | None = None

class StateGraph(TypedDict):
transitions: dict[StrEnum, dict[StrEnum, Transition]]
initial: StrEnum
transitions: dict[Any, dict[Any, Transition]]
initial: Any


class FSM(Generic[TState, TEvent, TAddon]):
Expand Down
4 changes: 2 additions & 2 deletions nonebot_bison/platform/bilibili/retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,11 @@ async def reset(self):


def retry_for_352(api_func: Callable[[TBilibili, Target], Awaitable[list[DynRawPost]]]):
# fsm = RetryFSM(RETRY_GRAPH, RetryAddon[TBilibili]())
# _retry_fsm = RetryFSM(RETRY_GRAPH, RetryAddon[TBilibili]())

@wraps(api_func)
async def wrapper(bls: TBilibili, *args, **kwargs) -> list[DynRawPost]:
# nonlocal fsm
# nonlocal _retry_fsm
if not _retry_fsm.started:
await _retry_fsm.start(bls)

Expand Down

0 comments on commit 38dd0d4

Please sign in to comment.