Skip to content

Commit 69a0df1

Browse files
fix: change param order in Operator.__init__() for retro-compatibility
fix: apply style checks
1 parent bf848d5 commit 69a0df1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/ansys/dpf/core/dpf_operator.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class Operator:
121121
122122
"""
123123

124-
def __init__(self, name=None, operator=None, config=None, server=None):
124+
def __init__(self, name=None, config=None, server=None, operator=None):
125125
"""Initialize the operator with its name by connecting to a stub."""
126126
self.name = name
127127
self._internal_obj = None
@@ -136,7 +136,6 @@ def __init__(self, name=None, operator=None, config=None, server=None):
136136
# step 2: get api
137137
self._api_instance = None # see _api property
138138

139-
140139
# step2: if object exists, take the instance, else create it
141140
if operator is not None:
142141
if isinstance(operator, Operator):
@@ -159,7 +158,9 @@ def __init__(self, name=None, operator=None, config=None, server=None):
159158
self.name = self._api.operator_name(self)
160159
else:
161160
if self._server.has_client():
162-
self._internal_obj = self._api.operator_new_on_client(self.name, self._server.client)
161+
self._internal_obj = self._api.operator_new_on_client(
162+
self.name, self._server.client
163+
)
163164
else:
164165
self._internal_obj = self._api.operator_new(self.name)
165166

0 commit comments

Comments
 (0)