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

Raise an exception when filters' value isn't a list. #2576

Merged
merged 7 commits into from
Aug 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add an exeception when filters' value isn't a list
  • Loading branch information
arbaobao committed Jul 10, 2024
commit 94f30dccd5a1f8efe1d8108a00b173c691c9a401
3 changes: 3 additions & 0 deletions flytekit/models/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,11 @@ def __init__(self, key, values):
:param Text key: The name of the field to compare against
:param list[Text] values: A list of textual values to compare.
"""
if not isinstance(values, list):
raise TypeError("values must be a list.")
pingsutw marked this conversation as resolved.
Show resolved Hide resolved
super(SetFilter, self).__init__(key, ";".join(values))


@classmethod
def _parse_value(cls, value):
return value.split(";")
Expand Down