Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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/4515.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Implement migration adapter check for textual settings parameters.
11 changes: 7 additions & 4 deletions src/ansys/fluent/core/solver/flobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,10 +686,13 @@ def set_state(self, state: StateT | None = None, **kwargs):
allowed_types = (str, VariableDescriptor)

if not isinstance(state, allowed_types):
expected = " or ".join(t.__name__ for t in allowed_types)
raise TypeError(
f"Expected state to be {expected}, got {type(state).__name__}."
)
if self._has_migration_adapter:
return self.base_set_state(state=state, **kwargs)
Comment on lines +689 to +690
Copy link

Copilot AI Oct 8, 2025

Choose a reason for hiding this comment

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

The _has_migration_adapter property is not defined or documented in the visible code. Consider adding a comment explaining what this property represents and how it determines if a migration adapter is available.

Copilot uses AI. Check for mistakes.
else:
expected = " or ".join(t.__name__ for t in allowed_types)
raise TypeError(
f"Expected state to be {expected}, got {type(state).__name__}."
)
return self.base_set_state(state=_to_field_name_str(state), **kwargs)


Expand Down
Loading