Skip to content

Add selective inline typing for Aggregation - #823

Open
heejaechang wants to merge 2 commits into
wireservice:masterfrom
heejaechang:heejaechang-bundle-aggregation-stubs
Open

Add selective inline typing for Aggregation#823
heejaechang wants to merge 2 commits into
wireservice:masterfrom
heejaechang:heejaechang-bundle-aggregation-stubs

Conversation

@heejaechang

Copy link
Copy Markdown

Summary

  • add selective inline typing for agate.aggregations.base.Aggregation
  • retain the PEP 561 py.typed marker
  • remove the sidecar .pyi files proposed in closed Add inline typing for Aggregation #822
  • preserve Python 3.10 behavior, signatures, MRO, exceptions, and runtime non-subscriptability

This replaces closed #822 in response to the maintainer feedback: #822 (comment)

Only fully proven exact annotations are retained. First and Summary were deliberately left unannotated because their runtime bodies cross wholly untyped Table, Column, and DataType surfaces. The change uses no Any, object erasure, casts, ignores, invented protocols, variadic escapes, or broad-union workarounds.

Validation

  • strict Pyright and mypy source checks and positive consumers pass
  • both checkers reject bad overrides, wrong results, fake table inputs, dropped nullability, and invalid covariance
  • fresh-wheel VerifyTypes improves exported known types 28→29 and unknown types 437→436 with zero diagnostics
  • scoped unflagged stubtest passes; full stubtest is exactly baseline-equivalent
  • 397 tests pass with 93% coverage on CPython 3.10–3.14
  • runtime/MRO and complete aggregation override-domain probes pass on Python 3.10 and the fresh wheel
  • lint, import sorting, manifest, warning-fatal docs, wheel/sdist build, Twine, payload, and production-hash checks pass

heejaechang and others added 2 commits July 28, 2026 11:36
Provide exact generic result relationships for Aggregation, First, and Summary while leaving dependency-bound aggregation modules untyped.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Move the exact generic Aggregation contract into runtime source while preserving its Python 3.10 MRO and runtime behavior. Remove the concrete sidecars whose untyped Table, Column, and DataType dependencies cannot satisfy strict inline checking without erasure or suppressions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

1 participant