Skip to content

Commit 67a8e56

Browse files
committed
IHS-170: Disable rich console print markup causing regex reformatting
1 parent 7fbc329 commit 67a8e56

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

changelog/565.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Disable rich console print markup causing regex reformatting

infrahub_sdk/ctl/schema.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ def display_schema_load_errors(response: dict[str, Any], schemas_data: list[Sche
7373
loc_type = loc_path[-1]
7474
input_str = error.get("input", None)
7575
error_message = f"{loc_type} ({input_str}) | {error['msg']} ({error['type']})"
76-
console.print(f" Node: {node.get('namespace', None)}{node.get('name', None)} | {error_message}")
76+
console.print(
77+
f" Node: {node.get('namespace', None)}{node.get('name', None)} | {error_message}", markup=False
78+
)
7779

7880
elif len(loc_path) > 6:
7981
loc_type = loc_path[5]
@@ -91,7 +93,9 @@ def display_schema_load_errors(response: dict[str, Any], schemas_data: list[Sche
9193

9294
input_str = error.get("input", None)
9395
error_message = f"{loc_type[:-1].title()}: {input_label} ({input_str}) | {error['msg']} ({error['type']})"
94-
console.print(f" Node: {node.get('namespace', None)}{node.get('name', None)} | {error_message}")
96+
console.print(
97+
f" Node: {node.get('namespace', None)}{node.get('name', None)} | {error_message}", markup=False
98+
)
9599

96100

97101
def handle_non_detail_errors(response: dict[str, Any]) -> None:

0 commit comments

Comments
 (0)