Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(🐞) uv add alphabetic preservation sorts prefixes after longer entries #9076

Closed
KotlinIsland opened this issue Nov 13, 2024 · 3 comments · Fixed by #9097
Closed

(🐞) uv add alphabetic preservation sorts prefixes after longer entries #9076

KotlinIsland opened this issue Nov 13, 2024 · 3 comments · Fixed by #9097
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@KotlinIsland
Copy link

KotlinIsland commented Nov 13, 2024

i would think that pylint would come before pylint-module-boundaries

[tool.uv]
dev-dependencies = [
  # should be in alphabetical order
  "pylint>=3.2.6",
  "pylint-module-boundaries>=1.3.1",
  "ruff>=0.6.2,<7",
]
> uv add robotcode[analyze]==0.97.0 --dev
[tool.uv]
dev-dependencies = [
  # should be in alphabetical order
  "pylint>=3.2.6",
  "pylint-module-boundaries>=1.3.1",
  "ruff>=0.6.2,<7",
  "robotcode[analyze]==0.97.0",
]

------------------------

[tool.uv]
dev-dependencies = [
  # should be in alphabetical order
  "pylint-module-boundaries>=1.3.1",
  "pylint>=3.2.6",
  "ruff>=0.6.2,<7",
]
> uv add robotcode[analyze]==0.97.0 --dev
[tool.uv]
dev-dependencies = [
  # should be in alphabetical order

  "pylint-module-boundaries>=1.3.1",
  "pylint>=3.2.6",
  "robotcode[analyze]==0.97.0",
  "ruff>=0.6.2,<7",
]
@KotlinIsland KotlinIsland changed the title (🐞) uv add alphabetic preservation sorts prefixes after loger entries (🐞) uv add alphabetic preservation sorts prefixes after longer entries Nov 13, 2024
@zanieb
Copy link
Member

zanieb commented Nov 13, 2024

I would think so too!

@zanieb zanieb added bug Something isn't working good first issue Good for newcomers labels Nov 13, 2024
@zanieb
Copy link
Member

zanieb commented Nov 13, 2024

(I'm not sure this is actually easy to fix, but hopefully it is!)

@charliermarsh
Copy link
Member

I think the issue is we (erroneously) compare the entire string including the specifiers -- so it's not pylint vs pylint-module-boundaries, it's pylint>=3.2.6 vs. pylint-module-boundaries>=1.3.1.

@charliermarsh charliermarsh self-assigned this Nov 13, 2024
charliermarsh added a commit that referenced this issue Nov 13, 2024
## Summary

This PR ensures that `pylint>=3.2.6` followed by
`pylint-module-boundaries>=1.3.1` is considered sorted, despite the fact
that `>` is later in the alphabetic than `-`. By purely comparing
strings, they would _not_ be sorted; but by considering the name, then
the specifiers, they are.

Closes #9076.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants