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 __int__, __hash__, __eq__ methods and missing annotations to Token, Local, and Argument classes #103

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

akhilguruprasad22
Copy link
Contributor

Closes #16 and additionally works towards #8

Chose to not declare these classes as subclasses of int due to possible issues regarding immutability of an instance and mainly compatibility, resulting in unpredictable behaviour (as these instances are expected to be valid substitutes for ints in operations which do not make sense for indices or tokens).

Copy link

google-cla bot commented Mar 16, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Collaborator

@mike-hunhoff mike-hunhoff left a comment

Choose a reason for hiding this comment

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

Thanks @akhilguruprasad22 ! See my comments

dncil/clr/argument.py Outdated Show resolved Hide resolved
dncil/clr/local.py Outdated Show resolved Hide resolved
dncil/clr/token.py Outdated Show resolved Hide resolved
@mike-hunhoff
Copy link
Collaborator

@akhilguruprasad22 lints are failing. Please be sure you've locally executed the linting steps outlined in the README.

@akhilguruprasad22
Copy link
Contributor Author

Noted, @mike-hunhoff . Will look into resolving this right away.

Copy link
Collaborator

@mike-hunhoff mike-hunhoff left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@mike-hunhoff mike-hunhoff merged commit c6600cf into mandiant:main Mar 20, 2024
11 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.

add __int__, __hash__, __eq__, etc. methods to Token, Local, and Argument classes
2 participants