Skip to content

Commit

Permalink
using pretty_print
Browse files Browse the repository at this point in the history
  • Loading branch information
bbeat2782 committed Jun 28, 2023
1 parent c4c204a commit e6d11fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/sql/cmd/snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def snippets(others):
if len(all_snippets) == 0:
err_msg = "%sThere is no available snippet."
else:
err_msg = f"%sAvailable snippets are {', '.join(all_snippets)}."
err_msg = "%sAvailable snippets are " f"{util.pretty_print(all_snippets)}."
err_msg = err_msg % (base_err_msg)

raise UsageError(err_msg)
Expand Down
8 changes: 4 additions & 4 deletions src/tests/test_magic_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,16 +428,16 @@ def test_snippet(ip_snippets):
None,
"%sqlcmd snippets invalid",
(
"'invalid' is not a snippet. Available snippets are high_price, "
"high_price_a, high_price_b."
"'invalid' is not a snippet. Available snippets are 'high_price', "
"'high_price_a', and 'high_price_b'."
),
),
(
"%sqlcmd snippets -d high_price_b",
"%sqlcmd snippets invalid",
(
"'invalid' is not a snippet. Available snippets are high_price, "
"high_price_a."
"'invalid' is not a snippet. Available snippets are 'high_price', "
"and 'high_price_a'."
),
),
(
Expand Down

0 comments on commit e6d11fb

Please sign in to comment.