File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222from twisted .python .failure import Failure
2323from twisted .internet .task import deferLater
2424
25- from ._intents import Delay , ParallelEffects
26- from ._base import perform as base_perform
27- from ._dispatcher import TypeDispatcher
28- from ._utils import wraps
29- from .async import perform_parallel_async
25+ from effect import (
26+ Delay ,
27+ ParallelEffects ,
28+ perform as base_perform ,
29+ TypeDispatcher )
30+ from effect .async import perform_parallel_async
31+ from effect ._utils import wraps # whoah there
3032
3133
3234def deferred_to_box (d , box ):
Original file line number Diff line number Diff line change 1111from twisted .internet .task import Clock
1212from twisted .python .failure import Failure
1313
14- from ._base import Effect
15- from ._intents import (
16- Constant ,
17- Delay ,
18- base_dispatcher ,
19- parallel )
20- from ._dispatcher import ComposedDispatcher
21- from .twisted import (
14+ from effect import (
15+ Constant , Delay , Effect ,
16+ base_dispatcher , parallel ,
17+ ComposedDispatcher ,
18+ )
19+ from . import (
2220 deferred_performer ,
2321 exc_info_to_failure ,
2422 make_twisted_dispatcher ,
2523 perform )
2624
27- from .test_base import func_dispatcher
25+
26+ def func_dispatcher (intent ):
27+ """
28+ Simple effect dispatcher that takes callables taking a box,
29+ and calls them with the given box.
30+ """
31+ def performer (dispatcher , intent , box ):
32+ intent (box )
33+ return performer
2834
2935
3036def _dispatcher (reactor ):
You can’t perform that action at this time.
0 commit comments