Skip to content

Sort integer keys with default order_by directions - #398

Merged
dgilland merged 1 commit into
dgilland:developfrom
ShahadatTest:fix/order-by-numeric-keys
Nov 1, 2026
Merged

dgilland merged 1 commit into
dgilland:developfrom
ShahadatTest:fix/order-by-numeric-keys

Conversation

@ShahadatTest

Copy link
Copy Markdown
Contributor

order_by([[2], [1]], [0], []) raises AttributeError: 'int' object has no attribute 'startswith', although the same integer key works with [True]. Default directions, exhausted order iterators and the legacy boolean reverse option reach the same string-only branch.

Apply the descending-prefix check only to string keys, leaving integer keys/indexes intact. Update both public and chain overloads for omitted orders, document integer keys, and cover mixed numeric/string keys, mapping collections, chaining, stable equal-key ordering, reverse options and unchanged input data.

Validation on Windows:

  • Before: 6 new regression cases fail and 1 control passes.
  • Full unit tests/doctests on Python 3.12: 3,086 passed, 100% coverage.
  • Python 3.10: full rerun passed with 100% coverage. The first run hit the existing real-time test_debounce timing failure.
  • New mypy regression test: 2 plugin cases pass; package mypy passes (15 files).
  • Full configured Ruff lint, changed-file formatting, regenerated chaining-stub comparison and diff whitespace checks pass.

Checked current contribution instructions and existing issues/PRs; no overlapping open fix was found. The account already appears in AUTHORS.rst.

AI assistance: OpenAI Codex investigated, implemented and tested this change at the account owner's request, aro 2ta, expanded to eta soho aro 25ta koro???. No independent human review is claimed.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 100.0%. remained the same — ShahadatTest:fix/order-by-numeric-keys into dgilland:develop

@dgilland
dgilland merged commit ddeca15 into dgilland:develop Nov 1, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants