Skip to content

feat(SetComp): Add support for set comprehensions and necessary tests #213

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

Closed
wants to merge 60 commits into from

Conversation

nagajaideep
Copy link
Contributor

@nagajaideep nagajaideep commented Mar 12, 2025

Pull Request description

This PR introduces support for set comprehensions in ASTx by adding a SetComp literal representation and its corresponding SetCompType. It also enhances type inference for set comprehensions and includes necessary test cases.

This PR aims to Solve #197

How to test these changes

  • Run the test suite:
    pytest tests/datatypes/test_flows.py
    pre-commit run --all-files
    

Pull Request checklists

Note:

Test basic creation and properties of SetComprehension.
OLD:
image
NEW:
image

Test SetComprehension with multiple generators.
image

Test SetComprehension with a non-numeric element type.
image

This PR is a:

  • bug-fix
  • new feature
  • maintenance

About this PR:

  • it includes tests.
  • the tests are executed on CI.
  • the tests generate log file(s) (path).
  • pre-commit hooks were executed locally.
  • this PR requires a project documentation update.

Author's checklist:

  • I have reviewed the changes and it contains no misspelling.
  • The code is well commented, especially in the parts that contain more
    complexity.
  • New and old tests passed locally.

Additional information

Reviewer's checklist

Copy and paste this template for your review's note:

## Reviewer's Checklist

- [ ] I managed to reproduce the problem locally from the `main` branch
- [ ] I managed to test the new changes locally
- [ ] I confirm that the issues mentioned were fixed/resolved .

@nagajaideep nagajaideep requested a review from xmnlab March 28, 2025 18:01
@xmnlab xmnlab marked this pull request as draft April 2, 2025 21:24
@xmnlab
Copy link
Contributor

xmnlab commented Apr 2, 2025

hi @nagajaideep , there are a few git conflicts here.
I am changing this pr to draft, feel free to change it to "ready for review" and ping me after your rebase it and it is ready again for review.

@nagajaideep
Copy link
Contributor Author

Thanks for the update! I’m working on the proposal reformatting as suggested. I’ll resolve the conflicts, rebase the branch, and mark it as Ready for Review soon. Will ping you once both are ready!

@xmnlab
Copy link
Contributor

xmnlab commented Apr 6, 2025

@nagajaideep could you rebase yoru branch on top of the upstream main please?

@xmnlab
Copy link
Contributor

xmnlab commented Apr 6, 2025

@nagajaideep

I just merged this PR: #245

let me know if it clear now. sorry for the confusion.

@nagajaideep
Copy link
Contributor Author

No issues ivan
I will rebase and update my implementation ASAP

@nagajaideep nagajaideep closed this by deleting the head repository Apr 11, 2025
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