Conditions | 1 |
Total Lines | 15 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | from ..protocol import Observable, Observer, Subscription, default_subscription |
||
7 | def rx_empty() -> Observable: |
||
8 | """Create an empty Observable. |
||
9 | |||
10 | An "empty" Observable emits only the complete notification. |
||
11 | |||
12 | Returns: |
||
13 | (Observable) observable instance |
||
14 | |||
15 | """ |
||
16 | |||
17 | async def _subscribe(an_observer: Observer) -> Subscription: |
||
18 | await an_observer.on_completed() |
||
19 | return default_subscription |
||
20 | |||
21 | return rx_create(subscribe=_subscribe) |
||
22 |