-
Notifications
You must be signed in to change notification settings - Fork 1
commons.hub_state.py needs more #131
Copy link
Copy link
Open
Description
There are several things I find lacking in the current implementation of basic_bot.commons.hub_state.
- For example, there is no example of how to fetch an individual key. Probably because the accepted way is to just reach into the
statemember variable and do a.geton that like,hub_state.state.get('some-key'). See below for more about this. - There should be an overload of
.getmethod on basic_bot.commons.HubState that accepts a singular key and does a.geton thestatevar to get and return a singular value - Doc comment for the
getmethod need to explicitly swear allegience to the Pythonic way of .get method and what is returned / happens when keys don't exist in the state. The current method is behaving as I might expect - keys not found are not added to the return value. Singular version should just returnNoneif key not found.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels