Fix usage of format_help (#5872)

* Fix usage of format_help
This commit is contained in:
Oz Tiram
2023-08-26 13:54:50 +02:00
committed by GitHub
parent 2062c6b1fb
commit 60c8c97a6c
3 changed files with 3 additions and 3 deletions
+1
View File
@@ -0,0 +1 @@
Fix regression that caused printing non-printable ascii characters when help was called.
+1 -1
View File
@@ -189,7 +189,7 @@ def cli(
# Check this again before exiting for empty ``pipenv`` command.
elif ctx.invoked_subcommand is None:
# Display help to user, if no commands were passed.
console.print(format_help(ctx.get_help()))
print(format_help(ctx.get_help()))
@cli.command(
+1 -2
View File
@@ -71,8 +71,7 @@ def unnest(elem: Iterable) -> Any:
for el in target:
if isinstance(el, Iterable) and not isinstance(el, str):
el, el_copy = tee(el, 2)
for sub in unnest(el_copy):
yield sub
yield from unnest(el_copy)
else:
yield el