File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44
55[project ]
66name = " rid-lib"
7- version = " 3.2.6 "
7+ version = " 3.2.7 "
88description = " Implementation of Reference Identifiers (RIDs) protocol in Python"
99authors = [
1010 {
name =
" Luke Miller" ,
email =
" [email protected] " }
Original file line number Diff line number Diff line change 1- from uuid import uuid4
21from rid_lib .core import ORN
32
43
54class KoiNetNode (ORN ):
65 namespace = "koi-net.node"
76
8- def __init__ (self , name , uuid ):
9- self .name = name
10- self .uuid = uuid
11-
12- @classmethod
13- def generate (cls , name ):
14- return cls (name , uuid4 ())
7+ def __init__ (self , name : str , hash : str ):
8+ self .name : str = name
9+ self .hash : str = hash
1510
1611 @property
1712 def reference (self ):
18- return f"{ self .name } +{ self .uuid } "
13+ return f"{ self .name } +{ self .hash } "
1914
2015 @classmethod
2116 def from_reference (cls , reference ):
2217 components = reference .split ("+" )
2318 if len (components ) == 2 :
2419 return cls (* components )
2520 else :
26- raise ValueError ("KOI-net Node reference must contain two '+'-separated components: '<name>+<uuid >'" )
21+ raise ValueError ("KOI-net Node reference must contain two '+'-separated components: '<name>+<hash >'" )
You can’t perform that action at this time.
0 commit comments