Skip to content

Use dense formatting for requirement version specifiers in diagnostics#2601

Merged
zanieb merged 2 commits intomainfrom
zb/format-requirement
Mar 22, 2024
Merged

Use dense formatting for requirement version specifiers in diagnostics#2601
zanieb merged 2 commits intomainfrom
zb/format-requirement

Conversation

@zanieb
Copy link
Copy Markdown
Member

@zanieb zanieb commented Mar 21, 2024

For consistency with the output in "no solution" errors

For consistency with the output in "no solution" errors
@zanieb zanieb added the cli Related to the command line interface label Mar 21, 2024
warning: The package `requests` requires `idna <4, >=2.5`, but `2.4` is installed.
warning: The package `requests` requires `urllib3 <3, >=1.21.1`, but `1.20` is installed.
warning: The package `requests` requires `idna<4,>=2.5`, but `2.4` is installed.
warning: The package `requests` requires `urllib3<3,>=1.21.1`, but `1.20` is installed.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this one hard to read, should split name and specifier?

Copy link
Copy Markdown
Member Author

@zanieb zanieb Mar 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason we don't tend to split the name and specifier is that we don't use ` so it's less ambiguous as a single statement. I'm thinking we should probably remove the "`" here for consistency with our other messaging, but it's not really a priority. I just want us to have a consistent presentation.

Another option is we use colors to separate the specifier from the name i.e. bold names.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd love using color for this, though still a space after the name for CI reports probably

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll look into that

@zanieb zanieb merged commit d0cb301 into main Mar 22, 2024
@zanieb zanieb deleted the zb/format-requirement branch March 22, 2024 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Related to the command line interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants