File size: 418 Bytes
4398510
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from .reducer import reducer
from utils.stores import Store
from typing import Callable, List, Union

wsg_store = None


def return_value():
    return wsg_store.get_state()


wsg_store = Store(reducer)

wsg_store.add_listener(return_value)


def use_WSG() -> List[Union[str, Callable]]:
    """The use_WSG function contains wsg result and and wsg dispatcher."""
    return [wsg_store.get_state(), wsg_store.dispatch]