Skip to content

Correct scalar exponent types for power on float lists - #386

Merged
dgilland merged 1 commit into
dgilland:developfrom
Gambit-Checkmate:fix/power-list-exponent-types
Oct 29, 2026
Merged

dgilland merged 1 commit into
dgilland:developfrom
Gambit-Checkmate:fix/power-list-exponent-types

Conversation

@Gambit-Checkmate

Copy link
Copy Markdown
Contributor

Closes #385.

The float-list power overload annotated its exponent as List[Union[int,float]], even though runtime applies one scalar exponent to each item. Use Union[int,float], matching the existing scalar-float overload, and regenerate AllFuncs chain declarations. Runtime arithmetic is unchanged.

The focused regression fails type checking before the fix while its runtime execution already passes. It now verifies integer/fractional/negative scalar exponents, direct/chained list results, the existing integer-list union return, and rejection of a list exponent (an intentional call-overload ignore, checked for unused ignores). This does not expand or change complex/Decimal arithmetic typing.

Validation on Windows / CPython 3.13.13:

  • Full unit/doctest suite: 2,990 passed, 100% coverage.
  • New focused mypy-testing checks: 4 passed (type checking and execution).
  • Full source/test/tasks mypy, Ruff lint/format, generated-chain comparison and git diff checks passed.
  • Sphinx with warnings as errors, wheel and sdist builds passed.
  • Other interpreter/platform results await hosted CI.

Unreleased changelog updated; existing AUTHORS entry retained. Found through code inspection, not production usage. OpenAI Codex (GPT-6 family; exact deployment identifier unavailable) assisted with investigation, implementation, tests and submission under the user's daily contribution request. No unrelated runtime changes.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 100.0%. remained the same — Gambit-Checkmate:fix/power-list-exponent-types into dgilland:develop

@dgilland
dgilland merged commit 0659f5a into dgilland:develop Oct 29, 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.

Float-list power overload declares a list exponent instead of a scalar

3 participants