Skip to content

Read iterable sort directions before checking emptiness - #452

Merged
dgilland merged 1 commit into
dgilland:developfrom
Gambit-Checkmate:fix/order-by-direction-truth-test
Nov 15, 2026
Merged

dgilland merged 1 commit into
dgilland:developfrom
Gambit-Checkmate:fix/order-by-direction-truth-test

Conversation

@Gambit-Checkmate

Copy link
Copy Markdown
Contributor

Change

Materialize the supplied order_by directions before testing whether they are empty. A NumPy boolean array can now supply multiple directions without raising an ambiguous truth value error, and a single False direction is preserved. The existing scalar-bool reverse shorthand and empty-iterable behavior are unchanged.

Fixes #451.

Validation

  • The dependency-free regression fails on develop and passes with the fix. NumPy 2.5.4 smoke tests cover multiple, single-false, and empty arrays.
  • CPython 3.13.13: 3,325 tests and doctests pass with 100% coverage. The 29 focused ordering cases pass on Windows 3.11, 3.12, and 3.14. Linux 3.10 smoke passes.
  • Ruff lint and formatting, mypy, chaining stub freshness, strict Sphinx, sdist/wheel builds, and git diff --check pass.

OpenAI Codex (GPT-6 based) assisted with investigation, implementation, testing, and drafting.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 100.0%. remained the same — Gambit-Checkmate:fix/order-by-direction-truth-test into dgilland:develop

@dgilland
dgilland merged commit 0dd09c6 into dgilland:develop Nov 15, 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.

order_by truth-tests iterable sort directions before reading them

3 participants