Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

fix: 'type' is not a required value for the schema #64

Merged
merged 2 commits into from
Dec 27, 2021
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
3 changes: 2 additions & 1 deletion bentoctl/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ def describe(file):
"""
try:
info_json = describe_deployment(deployment_config_path=file)
pprint(info_json)
if info_json is not None:
pprint(info_json)
except BentoctlException as e:
e.show()
sys.exit(1)
Expand Down
8 changes: 4 additions & 4 deletions bentoctl/deployment_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ def remove_help_message(schema):
for field, rules in schema.items():
if "help_message" in rules:
del rules["help_message"]
if rules["type"] == "dict":
rules["schema"] = remove_help_message(rules["schema"])
elif rules["type"] == "list":
rules["schema"] = remove_help_message({"list_item": rules["schema"]})[
if rules.get("type") == "dict":
rules["schema"] = remove_help_message(rules.get("schema"))
elif rules.get("type") == "list":
rules["schema"] = remove_help_message({"list_item": rules.get("schema")})[
"list_item"
]
schema[field] = rules
Expand Down