Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions doc/changelog.d/5047.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BaseTask.get_id potentially returning None
6 changes: 5 additions & 1 deletion src/ansys/fluent/core/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def inactive_tasks(self) -> list:
"""
return []

def get_id(self) -> str:
def get_id(self) -> str: # pylint: disable=missing-raises-doc
"""Get the unique string identifier of this task, as it is in the application.

Returns
Expand All @@ -340,6 +340,10 @@ def get_id(self) -> str:
type_, id_ = k.split(":")
if type_ == "TaskObject":
return id_
raise RuntimeError(
Comment thread
Gobot1234 marked this conversation as resolved.
Comment thread
Gobot1234 marked this conversation as resolved.
f"Task ID not found for task '{self.name()}'. "
"This may indicate the task was not properly initialized."
)
Comment on lines +343 to +346
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

This change introduces a new error path (raising RuntimeError when the task name is missing from workflow state). Please add/adjust a test to assert this behavior so regressions don’t reintroduce the previous implicit None return (and downstream TypeError).

Copilot uses AI. Check for mistakes.

def get_idx(self) -> int:
"""Get the unique integer index of this task, as it is in the application.
Expand Down
Loading