Skip to content

Fix static typing for set and frozenset array vars - #7625

Open
Huzi-06 wants to merge 1 commit into
reflex-dev:mainfrom
Huzi-06:fix/set-array-static-types
Open

Huzi-06 wants to merge 1 commit into
reflex-dev:mainfrom
Huzi-06:fix/set-array-static-types

Conversation

@Huzi-06

@Huzi-06 Huzi-06 commented Oct 21, 2026 •

Copy link
Copy Markdown

Summary

Fix static typing for set and frozenset array vars so literal creation preserves container types and indexing returns the
appropriate element var type.

  • Widen array type bounds, literal creation overloads, and indexing annotations.
  • Preserve array return types for array operations.
  • Remove the frozenset test cast and add typed regression coverage.
  • Add a changelog fragment.

Sequence component-prop runtime behavior is unchanged.

All Submissions

  • Have you followed the guidelines stated in CONTRIBUTING.md?
  • Have you checked for other open pull requests addressing this change?

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Changes To Core Features

  • Added an explanation of the changes and why they should be included.
  • Added regression tests.
  • Successfully ran tests with the changes locally.

Validation

  • Full unit suite: 12,107 passed, 26 skipped.
  • Coverage: 80.18% (required: 72%).
  • Linux-targeted Pyright: 0 errors, 1 warning in an unchanged file.
  • All other pre-commit hooks passed.
  • Native macOS Pyright reports 6 errors in unchanged benchmark files involving CPU-affinity APIs.
  • Integration tests were not run.

Related to ENG-13480; surfaced in the review of #7622.

Closes #7623

View guided diff

@Huzi-06
Huzi-06 requested a review from a team as a code owner October 21, 2026 07:07

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 4 files

View guided diff | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

Fixes static typing for set and frozenset array vars.

  • Set and frozenset vars keep their types through array use.

No actionable issues found. Tests were not run during this review.

Reviews (1) · Last reviewed commit: "Fix static typing for set and frozenset ..." · Reviewed by Greptile

@masenf masenf added the bug Something isn't working label Oct 21, 2026 — with ChatGPT Codex Connector
@masenf masenf added the on deck PRs lined up to review / merge next label Oct 21, 2026

@masenf masenf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for preparing this patch.

We're going to hold off for the moment, because set wasn't really supported at all in 0.10 and prior, and we're trying to figure out if we should represent it with a javascript Set and expose set operations as methods instead of just treating it like an array.

@masenf masenf removed the on deck PRs lined up to review / merge next label Oct 22, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a SetVar backed by the JS Set object

2 participants