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

[red-knot] Add symbols defined by match statements #12926

Merged
merged 2 commits into from
Aug 20, 2024

Conversation

dhruvmanila
Copy link
Member

@dhruvmanila dhruvmanila commented Aug 16, 2024

Summary

This PR adds symbols introduced by match statements.

There are three patterns that introduces new symbols:

  • as pattern
  • Sequence pattern
  • Mapping pattern

The recursive nature of the visitor makes sure that all symbols are added.

Test Plan

Add test case for all types of patterns that introduces a symbol.

@dhruvmanila dhruvmanila added the red-knot Multi-file analysis & type inference label Aug 16, 2024
Copy link

codspeed-hq bot commented Aug 16, 2024

CodSpeed Performance Report

Merging #12926 will not alter performance

Comparing dhruv/match-stmt-symbols (c08d870) with main (aefadde)

Summary

✅ 32 untouched benchmarks

Copy link
Contributor

github-actions bot commented Aug 16, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@dhruvmanila dhruvmanila force-pushed the dhruv/match-stmt-symbols branch from 64a6c79 to 9c25336 Compare August 16, 2024 11:11
@dhruvmanila dhruvmanila marked this pull request as ready for review August 16, 2024 11:13
Copy link
Contributor

@carljm carljm left a comment

Choose a reason for hiding this comment

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

Looks great!

@dhruvmanila dhruvmanila force-pushed the dhruv/match-stmt-symbols branch from 9c25336 to eb0e6d5 Compare August 20, 2024 05:05
@dhruvmanila dhruvmanila enabled auto-merge (squash) August 20, 2024 05:06
@dhruvmanila dhruvmanila merged commit 1a8f29e into main Aug 20, 2024
18 checks passed
@dhruvmanila dhruvmanila deleted the dhruv/match-stmt-symbols branch August 20, 2024 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
red-knot Multi-file analysis & type inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants