File tree 2 files changed +15
-5
lines changed
src/ansys/fluent/core/meshing
2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -38,10 +38,14 @@ def __dir__(self):
38
38
39
39
class Task (PyCallableStateObject ):
40
40
def __init__ (self , meshing , name ):
41
- self ._workflow = meshing ._workflow
42
- self ._meshing = meshing ._meshing
43
- self ._task = self ._workflow .TaskObject [name ]
44
- self ._cmd = None
41
+ self .__dict__ .update (
42
+ dict (
43
+ _workflow = meshing ._workflow ,
44
+ _meshing = meshing ._meshing ,
45
+ _task = meshing ._workflow .TaskObject [name ],
46
+ _cmd = None ,
47
+ )
48
+ )
45
49
46
50
@property
47
51
def CommandArguments (self ):
@@ -62,6 +66,12 @@ def _command(self):
62
66
def __getattr__ (self , attr ):
63
67
return getattr (self ._task , attr )
64
68
69
+ def __setattr__ (self , attr , value ):
70
+ if attr in self .__dict__ :
71
+ self .__dict__ [attr ] = value
72
+ else :
73
+ setattr (self ._task , attr , value )
74
+
65
75
def __dir__ (self ):
66
76
return sorted (
67
77
set (list (self .__dict__ .keys ()) + dir (type (self )) + dir (self ._task ))
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ def assign_task_arguments(
11
11
task .Arguments = kwargs
12
12
if check_state :
13
13
# the state that we have set must be a subset of the total state
14
- assert kwargs .items () <= task .Arguments .items ()
14
+ assert kwargs .items () <= task .Arguments () .items ()
15
15
16
16
17
17
def check_task_execute_preconditions (task ) -> None :
You can’t perform that action at this time.
0 commit comments