Skip to content

Commit

Permalink
Merge pull request #644 from SmithSamuelM/misfit
Browse files Browse the repository at this point in the history
some cleanup on doc strings and comments
  • Loading branch information
SmithSamuelM authored Dec 30, 2023
2 parents 8cdafa9 + 0b2c878 commit a50a7b4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
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

0 comments on commit a50a7b4

Please sign in to comment.