pyegeria 5.4.2__py3-none-any.whl → 5.4.2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -156,10 +156,6 @@ def display_command_terms(
156
156
 
157
157
  terms = g_client.find_glossary_terms(
158
158
  search_string,
159
- glossary_guid,
160
- starts_with=False,
161
- ends_with=False,
162
- status_filter=[],
163
159
  page_size=500,
164
160
  )
165
161
 
@@ -167,14 +163,14 @@ def display_command_terms(
167
163
  print(f"No commands found - this was not the command you were looking for?! - {search_string} : {glossary_guid} ")
168
164
  sys.exit(0)
169
165
  sorted_terms = sorted(
170
- terms, key=lambda k: k["glossaryTermProperties"].get("displayName","---")
166
+ terms, key=lambda k: k["properties"].get("displayName","---")
171
167
  )
172
168
  style = "bright_white on black"
173
169
  if type(terms) is str:
174
170
  return table
175
171
  glossary_info = {}
176
172
  for term in sorted_terms:
177
- props = term.get("glossaryTermProperties", "None")
173
+ props = term.get("properties", "None")
178
174
  if props == "None":
179
175
  return table
180
176
 
@@ -193,11 +189,9 @@ def display_command_terms(
193
189
  usage = props.get("usage", "---")
194
190
  # ex_us_out = Markdown(f"Example:\n{example}\n---\nUsage: \n{usage}")
195
191
 
196
- classifications = term["elementHeader"]["classifications"]
192
+ classifications = term["elementHeader"].get("classifications",None)
197
193
  glossary_guid = None
198
- for c in classifications:
199
- if c["classificationName"] == "Anchors":
200
- glossary_guid = c["classificationProperties"]["anchorScopeGUID"]
194
+
201
195
 
202
196
  if glossary_guid and glossary_guid in glossary_info:
203
197
  glossary_name = glossary_info[glossary_guid]
@@ -218,6 +212,11 @@ def display_command_terms(
218
212
  Markdown(usage),
219
213
  style="bold white on black",
220
214
  )
215
+ if not classifications:
216
+ continue
217
+ for c in classifications:
218
+ if c["classificationName"] == "Anchors":
219
+ glossary_guid = c["classificationProperties"]["anchorScopeGUID"]
221
220
 
222
221
  g_client.close_session()
223
222
  return table