Skip to content

Commit

Permalink
Fix caseless matching
Browse files Browse the repository at this point in the history
  • Loading branch information
dbalabka committed Jun 8, 2023
1 parent 6a20a9b commit c7d2e84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pdm/cli/commands/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def _group_of(name: str) -> set[str]:
keys = parse_comma_separated_string(options.sort)
if not all(key in Listable.KEYS for key in keys):
raise PdmUsageError(f"--sort key must be one of: {','.join(Listable.KEYS)}")
records.sort(key=lambda d: tuple(d[key].lower() for key in keys))
records.sort(key=lambda d: tuple(d[key].casefold() for key in keys))

# Write CSV
if options.csv:
Expand Down

0 comments on commit c7d2e84

Please sign in to comment.