@@ -1247,9 +1247,9 @@ def get_battery_data(
12471247 (RscpTag .BAT_REQ_DCB_INFO , RscpType .Uint16 , dcb ),
12481248 ],
12491249 ),
1250- keepAlive = True
1251- if dcb != dcbs [- 1 ]
1252- else keepAlive , # last request should honor keepAlive
1250+ keepAlive = (
1251+ True if dcb != dcbs [- 1 ] else keepAlive
1252+ ) , # last request should honor keepAlive
12531253 )
12541254
12551255 info = rscpFindTag (req , RscpTag .BAT_DCB_INFO )
@@ -1381,9 +1381,11 @@ def get_batteries_data(
13811381 self .get_battery_data (
13821382 batIndex = battery ["index" ],
13831383 dcbs = dcbs ,
1384- keepAlive = True
1385- if battery ["index" ] != batteries [- 1 ]["index" ]
1386- else keepAlive , # last request should honor keepAlive
1384+ keepAlive = (
1385+ True
1386+ if battery ["index" ] != batteries [- 1 ]["index" ]
1387+ else keepAlive
1388+ ), # last request should honor keepAlive
13871389 )
13881390 )
13891391
@@ -1716,9 +1718,9 @@ def get_pvi_data(
17161718 ),
17171719 ],
17181720 ),
1719- keepAlive = True
1720- if string != strings [- 1 ]
1721- else keepAlive , # last request should honor keepAlive
1721+ keepAlive = (
1722+ True if string != strings [- 1 ] else keepAlive
1723+ ) , # last request should honor keepAlive
17221724 )
17231725 stringobj = {
17241726 "power" : rscpFindTagIndex (
@@ -1771,9 +1773,9 @@ def get_pvis_data(
17711773 pviIndex = pvi ["index" ],
17721774 strings = strings ,
17731775 phases = phases ,
1774- keepAlive = True
1775- if pvi ["index" ] != pvis [- 1 ]["index" ]
1776- else keepAlive , # last request should honor keepAlive
1776+ keepAlive = (
1777+ True if pvi ["index" ] != pvis [- 1 ]["index" ] else keepAlive
1778+ ) , # last request should honor keepAlive
17771779 )
17781780 )
17791781
@@ -1931,9 +1933,11 @@ def get_powermeters_data(
19311933 outObj .append (
19321934 self .get_powermeter_data (
19331935 pmIndex = powermeter ["index" ],
1934- keepAlive = True
1935- if powermeter ["index" ] != powermeters [- 1 ]["index" ]
1936- else keepAlive , # last request should honor keepAlive
1936+ keepAlive = (
1937+ True
1938+ if powermeter ["index" ] != powermeters [- 1 ]["index" ]
1939+ else keepAlive
1940+ ), # last request should honor keepAlive
19371941 )
19381942 )
19391943
0 commit comments