You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
asyncdef_(
a: int, # Need Providerb: Annotated[str, "index"], # will generate provider which fetch "index" from ctxc: Annotated[float, lambdactx: ctx["foo"]] # will generate provider which fetch "foo" from ctx
): ...
增加 bypass_if 便捷装饰器, 用来注入一条件判断的辅助器:
fromarclet.letodereaimportbypass_if
....
@bypass_if(lambdactx: notisinstance(ctx["event"], A)) # subscriber will pass when event is not Aasyncdef_(): ...