Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:

- name: Run mypy
run: |
poetry run mypy src
poetry run mypy

- name: Lint with Ruff
run: |
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
- id: poetry-check
- id: poetry-lock
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.12
rev: v0.12.0
hooks:
- id: ruff
args:
Expand All @@ -26,7 +26,7 @@ repos:
hooks:
- id: mypy
name: Check with mypy
entry: poetry run mypy src
entry: poetry run mypy
language: system
types:
- python
Expand Down
298 changes: 157 additions & 141 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "saic_ismart_client_ng"
version = "0.9.1"
version = "0.9.2"
description = "SAIC next gen client library (MG iSMART)"
authors = [
{ name = "Giovanni Condello", email = "saic-python-client@nanomad.net" },
Expand Down Expand Up @@ -34,7 +34,7 @@ build-backend = "poetry.core.masonry.api"
pytest = "^8.2.2"
mock = "^5.1.0"
coverage = "^7.5.4"
ruff = "^0.11.7"
ruff = "^0.12.0"
pytest-cov = "^5.0.0"
pytest-asyncio = "^0.24.0"
pytest-mock = "^3.14.0"
Expand Down
1 change: 0 additions & 1 deletion src/saic_ismart_client_ng/api/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ async def execute_api_call_with_event_id_inner(*, event_id: str) -> T | None:

return await execute_api_call_with_event_id_inner(event_id="0")

# pylint: disable=too-many-branches
async def __deserialize(
self,
request: httpx.Request,
Expand Down
4 changes: 2 additions & 2 deletions src/saic_ismart_client_ng/api/vehicle/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class ExtendedVehicleStatus:
@dataclass
class VehicleStatusResp:
# pylint: disable=import-outside-toplevel
from saic_ismart_client_ng.api.schema import GpsPosition
from saic_ismart_client_ng.api.schema import GpsPosition # noqa: PLC0415

basicVehicleStatus: BasicVehicleStatus | None = None
extendedVehicleStatus: ExtendedVehicleStatus | None = None
Expand Down Expand Up @@ -203,7 +203,7 @@ def rvc_req_type_decoded(self) -> bytes | None:
@dataclass
class VehicleControlResp:
# pylint: disable=import-outside-toplevel
from saic_ismart_client_ng.api.schema import GpsPosition
from saic_ismart_client_ng.api.schema import GpsPosition # noqa: PLC0415

basicVehicleStatus: BasicVehicleStatus | None = None
failureType: int | None = None
Expand Down
3 changes: 2 additions & 1 deletion src/saic_ismart_client_ng/api/vehicle_charging/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class BmsChargingStatusCode(Enum):
CHARGING_10 = 10 # Potentially DC fast charging
SUPER_OFFBOARD_CHARGING = 11
CHARGING_12 = 12
V2X_DISCHARGING = 13

@staticmethod
def to_code(code: int) -> BmsChargingStatusCode | None:
Expand Down Expand Up @@ -200,7 +201,7 @@ class ChargingStatus:
@dataclass
class ChargeStatusResp:
# pylint: disable=import-outside-toplevel
from saic_ismart_client_ng.api.schema import GpsPosition
from saic_ismart_client_ng.api.schema import GpsPosition # noqa: PLC0415

chargingStatus: ChargingStatus | None = None
gpsPosition: GpsPosition | None = None
Expand Down
1 change: 0 additions & 1 deletion src/saic_ismart_client_ng/net/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def __init__(
self.__listener = listener
self.__logger = logging.getLogger(__name__)
self.__user_token: str = ""
self.__class_name: str = ""
self.__client = httpx.AsyncClient(
timeout=Timeout(timeout=configuration.read_timeout),
event_hooks={
Expand Down