Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SequenceValue for heterogeneous sequences #515

Merged
merged 4 commits into from
Apr 11, 2022
Merged

Add SequenceValue for heterogeneous sequences #515

merged 4 commits into from
Apr 11, 2022

Conversation

JelleZijlstra
Copy link
Contributor

PEP 646 requires that we support heterogeneous, variable-length
sequences like tuple[int, *tuple[str, ...]]. This requires replacing
the SequenceIncompleteValue class, so we're doing this in steps:

  1. Add SequenceValue and accept it in all places that currently
    accept SequenceIncompleteValue, but don't infer it in any
    existing contexts (this PR).
  2. Update internal usages of SequenceIncompleteValue to also accept
    SequenceValue.
  3. Infer only SequenceValue inside pyanalyze.
  4. Remove internal usage of SequenceIncompleteValue.
  5. Drop SequenceIncompleteValue.

PEP 646 requires that we support heterogeneous, variable-length
sequences like tuple[int, *tuple[str, ...]]. This requires replacing
the SequenceIncompleteValue class, so we're doing this in steps:

1. Add SequenceValue and accept it in all places that currently
   accept SequenceIncompleteValue, but don't infer it in any
   existing contexts (this PR).
2. Update internal usages of SequenceIncompleteValue to also accept
   SequenceValue.
3. Infer only SequenceValue inside pyanalyze.
4. Remove internal usage of SequenceIncompleteValue.
5. Drop SequenceIncompleteValue.
@JelleZijlstra JelleZijlstra merged commit 1e9a823 into master Apr 11, 2022
@JelleZijlstra JelleZijlstra deleted the pep675 branch April 11, 2022 18:30
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