Ruff formatting adding commas

This commit is contained in:
jaknapper 2025-04-09 14:59:20 +01:00
parent 8d14aee27c
commit e28a160b22

View file

@ -686,7 +686,7 @@ class SmartScanThing(Thing):
"jpeg_path": jpeg_path, "jpeg_path": jpeg_path,
"cam": cam, "cam": cam,
"logger": logger, "logger": logger,
"metadata_getter": metadata_getter "metadata_getter": metadata_getter,
}, },
) )
capture_thread.start() capture_thread.start()
@ -769,7 +769,7 @@ class SmartScanThing(Thing):
jpeg_path: str, jpeg_path: str,
cam: CamDep, cam: CamDep,
metadata_getter: GetThingStates, metadata_getter: GetThingStates,
logger: InvocationLogger logger: InvocationLogger,
) -> None: ) -> None:
"""Capture an image and save it to disk """Capture an image and save it to disk
@ -812,19 +812,19 @@ class SmartScanThing(Thing):
) )
return image, metadata return image, metadata
def save_capture(
def save_capture(self, self,
jpeg_path: str, jpeg_path: str,
image: np.ndarray, image: np.ndarray,
metadata: dict, metadata: dict,
logger: InvocationLogger logger: InvocationLogger,
) -> None: ) -> None:
"""Saving the captured image and metadata to disk """Saving the captured image and metadata to disk
logger warning (via InvocationLogger) is raised if metadata is failed to be added logger warning (via InvocationLogger) is raised if metadata is failed to be added
IOError is raised if the file cannot be saved IOError is raised if the file cannot be saved
nothing is returned on success""" nothing is returned on success"""
try: try:
Image.fromarray(image.astype("uint8"), "RGB").save( Image.fromarray(image.astype("uint8"), "RGB").save(