Skip to content

Commit 7cc5e09

Browse files
committed
update test
Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
1 parent 8ef6126 commit 7cc5e09

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

flytekit/models/task.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ def from_flyte_idl(cls, pb2_object):
701701

702702

703703
class Task(_common.FlyteIdlEntity):
704-
def __init__(self, id, closure, short_description):
704+
def __init__(self, id, closure, short_description=None):
705705
"""
706706
:param flytekit.models.core.identifier.Identifier id: The (project, domain, name) identifier for this task.
707707
:param TaskClosure closure: The closure for the underlying workload.
@@ -729,6 +729,7 @@ def closure(self):
729729
@property
730730
def short_description(self):
731731
"""
732+
The short description of the task.
732733
:rtype: str
733734
"""
734735
return self._short_description

tests/flytekit/unit/models/test_tasks.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ def test_task(task_closure):
299299
obj = task.Task(
300300
identifier.Identifier(identifier.ResourceType.TASK, "project", "domain", "name", "version"),
301301
task_closure,
302+
"my short description",
302303
)
303304
assert obj.id.project == "project"
304305
assert obj.id.domain == "domain"

0 commit comments

Comments
 (0)