Skip to content

Commit

Permalink
Fix usage of format_help (#5872)
Browse files Browse the repository at this point in the history
* Fix usage of format_help
  • Loading branch information
oz123 authored Aug 26, 2023
1 parent 2062c6b commit 60c8c97
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions news/5872.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix regression that caused printing non-printable ascii characters when help was called.
2 changes: 1 addition & 1 deletion pipenv/cli/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
3 changes: 1 addition & 2 deletions pipenv/utils/funktools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 60c8c97

Please sign in to comment.