Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Lo <wenchih@apache.org>
  • Loading branch information
lowc1012 committed Feb 16, 2024
1 parent c888760 commit 7b03b8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flytekit/core/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def __post_init__(self):
def _check_none_or_str_or_int(value):
if value is None:
return
if not isinstance(value, str):
raise AssertionError(f"{value} should be a string")
if not isinstance(value, (str, int)):
raise AssertionError(f"{value} should be a string or an integer")

_check_none_or_str_or_int(self.cpu)
_check_none_or_str_or_int(self.mem)
Expand Down

0 comments on commit 7b03b8d

Please sign in to comment.