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

Improve AST Node Classes: Fix mutable default arguments and enhance r… #277

Merged
merged 4 commits into from
Mar 7, 2025

Conversation

Vruddhi18
Copy link
Contributor

Improve AST Node Classes: Fix mutable default arguments and enhance readability

Summary

  • Replaced mutable default arguments with None and initialized them inside constructors.
  • Added type annotations for improved clarity and type checking.
  • Enhanced repr methods for clearer and more informative string representations.

Changes

  • Replaced mutable default arguments with None and initialized them inside constructors to prevent unintended side effects.
  • Added type annotations to function parameters and return types for improved clarity and type safety.
  • Enhanced repr methods across all AST node classes for clearer and more informative string representations, aiding in debugging and logging.

Testing

  • Ran existing tests to ensure that no functionality was broken by the changes.
  • No new tests were added as the changes were primarily refactoring and did not alter the core logic.
  • Manually tested the AST node classes in a local environment to verify that the string representations and type annotations are functioning as expected.

Checklist

  • Tests cover new or changed code (or reason why not)
  • Only touched files related to the issue
  • Everything builds and runs locally

@Vruddhi18
Copy link
Contributor Author

@NripeshN @vaatsalya123 Please review this and let me know if there are any more changes needed.

@samthakur587
Copy link
Contributor

LGTM 🚀
Thanks @Vruddhi18 for contributing here !

@samthakur587 samthakur587 merged commit c27190c into CrossGL:main Mar 7, 2025
235 checks passed
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