Skip to content
Draft
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
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ doc = [
"smp>=4.1.0",
]

[tool.uv.sources]
smp = { git = "https://github.com/JPHutchins/smp", rev = "3cf33bed8111f5041c66394fae8df7cf8839bdaf" }

[tool.ruff]
line-length = 100
extend-exclude = ["dutfirmware", ".claude"]
Expand Down
4 changes: 4 additions & 0 deletions src/smpclient/requests/image_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ class ImageUploadWrite(smpimg.ImageUploadWriteRequest, _ImageGroupBase):

class ImageErase(smpimg.ImageEraseRequest, _ImageGroupBase):
_Response = smpimg.ImageEraseResponse


class ImageSlotInfoRead(smpimg.ImageSlotInfoReadRequest, _ImageGroupBase):
_Response = smpimg.ImageSlotInfoReadResponse
14 changes: 13 additions & 1 deletion tests/test_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@
FileUpload,
SupportedFileHashChecksumTypes,
)
from smpclient.requests.image_management import ImageStatesRead, ImageStatesWrite, ImageUploadWrite
from smpclient.requests.image_management import (
ImageSlotInfoRead,
ImageStatesRead,
ImageStatesWrite,
ImageUploadWrite,
)
from smpclient.requests.os_management import (
BootloaderInformationRead,
DateTimeRead,
Expand Down Expand Up @@ -107,6 +112,13 @@
smpimg.ImageManagementErrorV1,
smpimg.ImageManagementErrorV2,
),
(
smpimg.ImageSlotInfoReadRequest(),
ImageSlotInfoRead(),
smpimg.ImageSlotInfoReadResponse,
smpimg.ImageManagementErrorV1,
smpimg.ImageManagementErrorV2,
),
(
smpos.EchoWriteRequest(d="a"),
EchoWrite(d="a"),
Expand Down
Loading
Loading