@@ -123,9 +123,9 @@ def __init__(self, output_handle):
123123
124124 # Determine unit system from flow setting
125125 if self ._flow .value <= oapi .FlowUnits .AFD .value :
126- self .unit_labels = type (self )._unit_labels_us_
126+ self ._unit_labels = type (self )._unit_labels_us_
127127 else :
128- self .unit_labels = type (self )._unit_labels_si_
128+ self ._unit_labels = type (self )._unit_labels_si_
129129
130130 # Determine mass units from quality settings
131131 if self ._qual == oapi .QualUnits .MGL :
@@ -137,25 +137,25 @@ def __init__(self, output_handle):
137137
138138
139139 self ._metadata = {
140- oapi .NodeAttribute .DEMAND : ("Demand" , self .unit_labels [self ._flow ]),
141- oapi .NodeAttribute .HEAD : ("Head" , self .unit_labels [Units .HYD_HEAD ]),
142- oapi .NodeAttribute .PRESSURE : ("Pressure" , self .unit_labels [self ._press ]),
143- oapi .NodeAttribute .QUALITY : ("Quality" , self .unit_labels [self ._qual ]),
140+ oapi .NodeAttribute .DEMAND : ("Demand" , self ._unit_labels [self ._flow ]),
141+ oapi .NodeAttribute .HEAD : ("Head" , self ._unit_labels [Units .HYD_HEAD ]),
142+ oapi .NodeAttribute .PRESSURE : ("Pressure" , self ._unit_labels [self ._press ]),
143+ oapi .NodeAttribute .QUALITY : ("Quality" , self ._unit_labels [self ._qual ]),
144144
145- oapi .LinkAttribute .FLOW : ("Flow" , self .unit_labels [self ._flow ]),
146- oapi .LinkAttribute .VELOCITY : ("Velocity" , self .unit_labels [Units .VELOCITY ]),
147- oapi .LinkAttribute .HEADLOSS : ("Unit Headloss" , self .unit_labels [Units .HEADLOSS ]),
148- oapi .LinkAttribute .AVG_QUALITY : ("Quality" , self .unit_labels [self ._qual ]),
149- oapi .LinkAttribute .STATUS : ("Status" , self .unit_labels [Units .NONE ]),
150- oapi .LinkAttribute .SETTING : ("Setting" , self .unit_labels [Units .NONE ]),
151- oapi .LinkAttribute .RX_RATE : ("Reaction Rate" , self .unit_labels [self ._rx_rate ]),
152- oapi .LinkAttribute .FRCTN_FCTR : ("Friction Factor" , self .unit_labels [Units .UNITLESS ])
145+ oapi .LinkAttribute .FLOW : ("Flow" , self ._unit_labels [self ._flow ]),
146+ oapi .LinkAttribute .VELOCITY : ("Velocity" , self ._unit_labels [Units .VELOCITY ]),
147+ oapi .LinkAttribute .HEADLOSS : ("Unit Headloss" , self ._unit_labels [Units .HEADLOSS ]),
148+ oapi .LinkAttribute .AVG_QUALITY : ("Quality" , self ._unit_labels [self ._qual ]),
149+ oapi .LinkAttribute .STATUS : ("Status" , self ._unit_labels [Units .NONE ]),
150+ oapi .LinkAttribute .SETTING : ("Setting" , self ._unit_labels [Units .NONE ]),
151+ oapi .LinkAttribute .RX_RATE : ("Reaction Rate" , self ._unit_labels [self ._rx_rate ]),
152+ oapi .LinkAttribute .FRCTN_FCTR : ("Friction Factor" , self ._unit_labels [Units .UNITLESS ])
153153 }
154154
155155
156156 def get_attribute_metadata (self , attribute ):
157157 '''
158- Takes an attribute enum and returns the name and units in a tuple .
158+ Takes an attribute enum and returns a tuple with name and units.
159159 '''
160160 return self ._metadata [attribute ]
161161
0 commit comments