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

Handle empty text in Literal Eval #819

Merged
merged 3 commits into from
May 13, 2024

Conversation

antonpibm
Copy link
Collaborator

No description provided.

Signed-off-by: antonp@il.ibm.com <antonp@il.ibm.com>
@@ -237,4 +237,6 @@ def process_value(self, text: Any) -> Any:

class LiteralEval(FieldOperator):
def process_value(self, text: Any) -> Any:
if not text:
Copy link
Member

@elronbandel elronbandel May 13, 2024

Choose a reason for hiding this comment

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

Can you make this more explicit? (if text is None or text == "":) Maybe it should raise error in that case?
Also any chance you can raise ValueError with detailed message in case that not isinstance(text, str)
And thanks againg for the contributions @antonpibm !

Signed-off-by: antonp@il.ibm.com <antonp@il.ibm.com>
@elronbandel elronbandel merged commit a98a5d2 into IBM:main May 13, 2024
7 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