fix(show): preserve versions for long source URLs - #11065
Open
harbinresearcher wants to merge 1 commit into
Open
harbinresearcher wants to merge 1 commit into
harbinresearcher wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Check List
Resolves: #2880
Description
poetry showcalculates one version-column width from every displayed package. A direct URL or other source-qualified dependency can make that width larger than the terminal, causing Poetry to omit the version column for every package.This change keeps the existing full version display as the first choice. If it does not fit, the formatter retries with aligned
pretty_versionvalues for the current and latest version columns before falling back to name-only output.--no-truncatestill shows the complete source-qualified version, and JSON output is unchanged.Testing
.\.venv\Scripts\python.exe -m pytest tests\console\commands\test_show.py -q -n 0— 86 passed.\.venv\Scripts\python.exe -m ruff check --no-fix src\poetry\console\commands\show.py tests\console\commands\test_show.py.\.venv\Scripts\python.exe -m ruff format --check src\poetry\console\commands\show.py tests\console\commands\test_show.py.\.venv\Scripts\python.exe -m mypy src\poetry\console\commands\show.py tests\console\commands\test_show.py.\.venv\Scripts\python.exe -m pre_commit run --files src\poetry\console\commands\show.py tests\console\commands\test_show.py