File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -136,11 +136,12 @@ def wrapper(*args, **kwargs):
136
136
137
137
def generate_uuid_from_kwargs (** kwargs ) -> str :
138
138
"""
139
- Given key/pair combos, returns a string in uuid format.
140
- Such as `text='hi', size=32` it will return "text-hi-size-32".
141
- Called with no parameters, id does NOT return a random unique id.
139
+ Given key/pair combos, returns a string in "UUID" format.
140
+ With inputs such as `text='hi', size=32` it will return `"text=hi|size=32"`.
141
+ This function does NOT return a random unique ID.
142
+ It must be called with parameters, and will raise an error if passed no keyword arguments.
142
143
"""
143
- if len ( kwargs ) == 0 :
144
+ if not kwargs :
144
145
raise Exception ("generate_uuid_from_kwargs has to be used with kwargs, please check the doc." )
145
146
146
147
return "|" .join (f"{ key } ={ str (value )} " for key , value in kwargs .items ())
You can’t perform that action at this time.
0 commit comments