Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some cleanup on doc strings and comments #644

Merged
merged 1 commit into from
Dec 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/keri/app/habbing.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ class Habery:
psr (parsing.Parser): parses local messages for .kvy .rvy

habs (dict): Hab instances keyed by prefix.
To look up Hab by name get prefix from db.habs .prefix field using
.habByName
To look up Hab by name use use .habByName
To look up Hab by prefix us .habByPrefix
to get hab from db need name for key
hab prefix in db.habs record .hid field

inited (bool): True means fully initialized wrt databases.
False means not yet fully initialized
Expand Down Expand Up @@ -753,7 +755,8 @@ def prefixes(self):

def habByPre(self, pre):
"""
Returns the Hab from and namespace including the default namespace.
Returns the Hab instance from .habs or .namespace
including the default namespace.

Args:
pre (str): qb64 aid of hab to find
Expand All @@ -774,7 +777,8 @@ def habByPre(self, pre):
def habByName(self, name, ns=None):
"""
Returns:
hab (Hab): instance from .habs by name if any otherwise None
hab (Hab): instance by name from .habs or .namspaces
if any otherwise None

Parameters:
name (str): alias of Hab
Expand Down Expand Up @@ -1027,7 +1031,7 @@ def __init__(self, ks, db, cf, mgr, rtr, rvy, kvy, psr, *,
self.psr = psr # injected

self.name = name
self.ns = ns
self.ns = ns # what is this?
self.pre = pre # wait to setup until after db is known to be opened
self.temp = True if temp else False

Expand Down
7 changes: 5 additions & 2 deletions src/keri/core/eventing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1784,8 +1784,11 @@ def locallyOwned(self, pre):
pre = pre if pre is not None else ''
return pre in self.prefixes

def locallyOwnedGroup(self, pre):
"""Returns True if pre is locally owned group identifier prefix.

def locallyMembered(self, pre):
"""Returns True if group hab identifier prefix has as a contributing
member a locally owned prefix

Reads habs database to figure this out.

Parameters:
Expand Down
2 changes: 1 addition & 1 deletion src/keri/db/basing.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ class Baser(dbing.LMDBer):
the associated event. So one can lookup event digest, get its fn here
and then use fn to fetch event by fn from .fels.

.states (stts) is named subDB instance of SerderSuber that maps a prefix
.states (subkey stts.) is named subDB instance of SerderSuber that maps a prefix
to the latest keystate for that prefix. Used by ._kevers.db for read
through cache of key state to reload kevers in memory

Expand Down
Loading