Skip to content

Commit

Permalink
feat: in show {package} output, clarify meaning of 'required by' en…
Browse files Browse the repository at this point in the history
…tries (#9750)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
elliot-100 and pre-commit-ci[bot] authored Oct 14, 2024
1 parent a9793c9 commit 46f3ede
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ dependencies
- pytzdata >=2017.2.2

required by
- calendar >=1.4.0
- calendar requires >=1.4.0
```

### Options
Expand Down
2 changes: 1 addition & 1 deletion src/poetry/console/commands/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def _display_single_package_information(
self.line("")
self.line("<info>required by</info>")
for parent, requires_version in required_by.items():
self.line(f" - <c1>{parent}</c1> <b>{requires_version}</b>")
self.line(f" - <c1>{parent}</c1> requires <b>{requires_version}</b>")

return 0

Expand Down
2 changes: 1 addition & 1 deletion tests/console/commands/test_show.py
Original file line number Diff line number Diff line change
Expand Up @@ -1975,7 +1975,7 @@ def test_show_required_by_deps(
- msgpack-python >=0.5 <0.6
required by
- pendulum >=0.2.0 <0.3.0
- pendulum requires >=0.2.0 <0.3.0
""".splitlines()
actual = [line.rstrip() for line in tester.io.fetch_output().splitlines()]
assert actual == expected
Expand Down

0 comments on commit 46f3ede

Please sign in to comment.