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

isinstance() instead of eval #75

Merged
merged 2 commits into from
Mar 29, 2024
Merged

isinstance() instead of eval #75

merged 2 commits into from
Mar 29, 2024

Conversation

hrshdhgd
Copy link
Collaborator

@hrshdhgd hrshdhgd commented Mar 29, 2024

This fixes a few other things that came to light:

  • We need to pass the value of the Token object and not the entire object. This is done by

    new_token = extract(tree, "new_label")
    new_value, representation = get_entity_representation(new_token)
    

    I was directly passing new_token to the (say) NodeRename class which messed things up and there were weird strings with the class name Token in them.

  • This PR automatically fixes the extra quotes in the tokens since get_entity_representation() which was not called earlier takes care of it.

This PR overrides #69 rendering it redundant and a hacky solution

@hrshdhgd hrshdhgd marked this pull request as ready for review March 29, 2024 22:04
@hrshdhgd hrshdhgd requested a review from cmungall March 29, 2024 22:04
@cmungall cmungall merged commit 0a37270 into main Mar 29, 2024
6 checks passed
@hrshdhgd hrshdhgd deleted the eval-removeal branch March 29, 2024 23:32
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