Skip to content

isinstance() instead of eval#75

Merged
cmungall merged 2 commits intomainfrom
eval-removeal
Mar 29, 2024
Merged

isinstance() instead of eval#75
cmungall merged 2 commits intomainfrom
eval-removeal

Conversation

@hrshdhgd
Copy link
Copy Markdown
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
@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