Skip to content

Commit

Permalink
Renamed Command Arguments new() -> create_instance() (#1117)
Browse files Browse the repository at this point in the history
  • Loading branch information
prmukherj authored Nov 30, 2022
1 parent 3a52623 commit 1b358d2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ansys/fluent/core/services/datamodel_se.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ def _get_static_info(self):
PyCommand._stored_static_info[self.rules] = response.info
return PyCommand._stored_static_info[self.rules]

def new(self):
def create_instance(self):
try:
static_info = self._get_static_info()
id = self._create_command_arguments()
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/fluent/core/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def __init__(self, task_name):
task_cmd_name = task.CommandName()
cmd_creator = getattr(session, task_cmd_name)
if cmd_creator:
new_cmd = cmd_creator.new()
new_cmd = cmd_creator.create_instance()
if new_cmd:
return new_cmd
raise NewCommandError(task._name_())
Expand Down
4 changes: 2 additions & 2 deletions tests/test_meshing_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,8 @@ def test_read_only_behaviour_of_command_arguments(new_mesh_session):
).CommandArguments.CadImportOptions.OneZonePer.set_state(None)
assert msg.value.args[0] == "Command Arguments are read-only."

assert "set_state" in dir(m.ImportGeometry.new())
assert "set_state" in dir(m.ImportGeometry.new().NumParts)
assert "set_state" in dir(m.ImportGeometry.create_instance())
assert "set_state" in dir(m.ImportGeometry.create_instance().NumParts)


@pytest.mark.dev
Expand Down

0 comments on commit 1b358d2

Please sign in to comment.