Skip to content

Commit efbb5ce

Browse files
authored
doc: clarify--why command
1 parent a80f985 commit efbb5ce

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/cli.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ required by
444444
### Options
445445

446446
* `--without`: The dependency groups to ignore.
447-
* `--why`: Include reverse dependencies where applicable.
447+
* `--why`: When showing the full list, or a `--tree` for a single package, display why a package is included.
448448
* `--with`: The optional dependency groups to include.
449449
* `--only`: The only dependency groups to include.
450450
* `--default`: Only include the main dependencies. (**Deprecated**)
@@ -457,6 +457,7 @@ required by
457457
When `--only` is specified, `--with` and `--without` options are ignored.
458458
{{% /note %}}
459459

460+
460461
## build
461462

462463
The `build` command builds the source and wheels archives.

src/poetry/console/commands/show.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ class ShowCommand(GroupCommand):
5050
option(
5151
"why",
5252
None,
53-
"When listing the tree for a single package, start from parents.",
53+
"When showing the full list, or a <info>--tree</info> for a single package,"
54+
" also display why it's included.",
5455
),
5556
option("latest", "l", "Show the latest version."),
5657
option(

0 commit comments

Comments
 (0)