File tree 1 file changed +3
-12
lines changed
interfaces/cython/cantera
1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -48,10 +48,7 @@ cdef class ReactorBase:
48
48
if volume is not None :
49
49
self .volume = volume
50
50
51
- if node_attr is not None :
52
- self .node_attr = node_attr
53
- else :
54
- self .node_attr = {}
51
+ self .node_attr = node_attr or {}
55
52
56
53
def insert (self , _SolutionBase solution ):
57
54
"""
@@ -993,10 +990,7 @@ cdef class WallBase:
993
990
self .heat_flux = Q
994
991
if velocity is not None :
995
992
self .velocity = velocity
996
- if edge_attr is not None :
997
- self .edge_attr = edge_attr
998
- else :
999
- self .edge_attr = {}
993
+ self .edge_attr = edge_attr or {}
1000
994
1001
995
def _install (self , ReactorBase left , ReactorBase right ):
1002
996
"""
@@ -1224,10 +1218,7 @@ cdef class FlowDevice:
1224
1218
n = _reactor_counts[self .__class__.__name__ ]
1225
1219
self .name = ' {0}_{1}' .format(self .__class__.__name__ , n)
1226
1220
1227
- if edge_attr is not None :
1228
- self .edge_attr = edge_attr
1229
- else :
1230
- self .edge_attr = {}
1221
+ self .edge_attr = edge_attr or {}
1231
1222
1232
1223
self ._install(upstream, downstream)
1233
1224
You can’t perform that action at this time.
0 commit comments