Skip to content

Constantdict#635

Merged
inducer merged 5 commits intomainfrom
constantdict
Feb 15, 2026
Merged

Constantdict#635
inducer merged 5 commits intomainfrom
constantdict

Conversation

@inducer
Copy link
Owner

@inducer inducer commented Feb 15, 2026

No description provided.

@inducer inducer marked this pull request as ready for review February 15, 2026 20:09
Copilot AI review requested due to automatic review settings February 15, 2026 20:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request replaces the immutabledict library with constantdict throughout the codebase. Beyond the simple library substitution, the PR includes several type annotation changes that narrow types from ScalarExpression to ArithmeticExpression in reduction bounds and related code paths. The mypy baseline file has been completely removed (3017 lines), suggesting significant type checking improvements, though the basedpyright baseline shows some new type warnings related to the changes.

Changes:

  • Replaced immutabledict with constantdict across all Python files in the codebase
  • Narrowed type annotations for reduction bounds from ScalarExpression to ArithmeticExpression in several modules
  • Updated documentation URLs (JAX documentation moved to new domain)
  • Modified mapper methods in scalar_expr.py to use rec_arith instead of rec for processing bounds
  • Removed unused ScalarExpression import from pytato/reductions.py
  • Added runtime assertion in pytato/utils.py to validate arithmetic expression results
  • Deleted entire mypy baseline file and updated basedpyright baseline

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
pyproject.toml Updated dependency from immutabledict to constantdict
doc/conf.py Changed intersphinx URLs for jax and constantdict documentation
pytato/utils.py Replaced imports, narrowed return type to ArithmeticExpression, added assertion
pytato/scalar_expr.py Replaced imports, changed mapper methods to use rec_arith for bounds processing
pytato/reductions.py Replaced imports, narrowed type annotations for bounds, removed unused import
pytato/transform/lower_to_index_lambda.py Replaced imports, narrowed type annotations for bounds
pytato/transform/materialize.py Replaced import and usage
pytato/transform/einsum_distributive_law.py Replaced import and usage
pytato/transform/dead_code_elimination.py Replaced import and usage
pytato/transform/init.py Replaced import and usage
pytato/target/python/numpy_like.py Replaced import and usage
pytato/target/loopy/init.py Replaced import and usage
pytato/stringifier.py Replaced import and isinstance check
pytato/raising.py Replaced import and usage
pytato/loopy.py Replaced import, usage, and isinstance check
pytato/function.py Replaced import, usage, and isinstance checks
pytato/distributed/partition.py Replaced import and usage
pytato/codegen.py Replaced import and usage
pytato/cmath.py Replaced import and usage
pytato/array.py Replaced import, usage, and isinstance checks throughout
test/test_pytato.py Updated all test imports and usage
.mypy/baseline.json Deleted entire file (3017 lines removed)
.basedpyright/baseline.json Updated with new type checking warnings

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@inducer inducer enabled auto-merge (rebase) February 15, 2026 20:18
@inducer inducer merged commit d3cb147 into main Feb 15, 2026
10 checks passed
@inducer inducer deleted the constantdict branch February 15, 2026 20:54
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.

2 participants