File tree Expand file tree Collapse file tree 5 files changed +18
-14
lines changed
src/saic_ismart_client_ng Expand file tree Collapse file tree 5 files changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,6 @@ required-imports = ["from __future__ import annotations"]
144144 " D104" , # Missing docstring in public package
145145 " N802" , # Function name {name} should be lowercase
146146 " N816" , # Variable {name} in global scope should not be mixedCase
147- " PLR0913" , # Too many arguments in function definition
148147 " S101" , # Use of assert detected
149148 " SLF001" , # Private member accessed: {access}
150149 " T201" , # print found
@@ -154,7 +153,7 @@ required-imports = ["from __future__ import annotations"]
154153max-complexity = 13
155154
156155[tool .ruff .lint .pylint ]
157- max-args = 7
156+ max-args = 10
158157
159158[tool .mypy ]
160159files = [" ./src" , " ./tests" ]
Original file line number Diff line number Diff line change 99)
1010from saic_ismart_client_ng .crypto_utils import sha256_hex_digest
1111
12+ __all__ = [
13+ "AlarmSwitch" ,
14+ "AlarmSwitchReq" ,
15+ "AlarmSwitchResp" ,
16+ "AlarmType" ,
17+ ]
18+
1219
1320class SaicVehicleAlarmApi (SaicVehicleApi ):
1421 async def get_alarm_switch (self , vin : str ) -> AlarmSwitchResp :
Original file line number Diff line number Diff line change @@ -108,6 +108,14 @@ class BasicVehicleStatus:
108108 vehicleAlarmStatus : int | None = None
109109 wheelTyreMonitorStatus : int | None = None
110110
111+ @property
112+ def is_parked (self ) -> bool :
113+ return self .engineStatus != 1 or self .handBrake == 1
114+
115+ @property
116+ def is_engine_running (self ) -> bool :
117+ return self .engineStatus == 1
118+
111119
112120@dataclass
113121class ExtendedVehicleStatus :
@@ -124,16 +132,6 @@ class VehicleStatusResp:
124132 gpsPosition : GpsPosition | None = None
125133 statusTime : int | None = None
126134
127- @property
128- def is_parked (self ) -> bool :
129- return (v := self .basicVehicleStatus ) is not None and (
130- v .engineStatus != 1 or v .handBrake == 1
131- )
132-
133- @property
134- def is_engine_running (self ) -> bool :
135- return (v := self .basicVehicleStatus ) is not None and v .engineStatus == 1
136-
137135
138136class RvcParamsId (Enum ):
139137 FIND_MY_CAR_ENABLE = 1
You can’t perform that action at this time.
0 commit comments