From 47ee8e30f109a796ab3af6b9d24f19e8c1b06326 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 5 Sep 2023 12:25:36 -0700 Subject: [PATCH] rc-0.5.1 (#414) --- pyproject.toml | 2 +- src/viam/components/camera/camera.py | 18 +++++------------- src/viam/components/camera/client.py | 9 +++------ 3 files changed, 9 insertions(+), 20 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1fad9c970..e65a9ec27 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "viam-sdk" -version = "0.5.0" +version = "0.5.1" description = "Viam Robotics Python SDK" authors = [ "Naveed " ] license = "Apache-2.0" diff --git a/src/viam/components/camera/camera.py b/src/viam/components/camera/camera.py index b8adb589d..b7cc0aa9f 100644 --- a/src/viam/components/camera/camera.py +++ b/src/viam/components/camera/camera.py @@ -1,5 +1,5 @@ import abc -from typing import Final, List, NamedTuple, Optional, Tuple, Union, Any, Dict +from typing import Any, Dict, Final, List, NamedTuple, Optional, Tuple, Union from PIL.Image import Image @@ -36,12 +36,7 @@ class Properties(NamedTuple): @abc.abstractmethod async def get_image( - self, - mime_type: str = "", - *, - extra: Optional[Dict[str, Any]] = None, - timeout: Optional[float] = None, - **kwargs + self, mime_type: str = "", *, extra: Optional[Dict[str, Any]] = None, timeout: Optional[float] = None, **kwargs ) -> Union[Image, RawImage]: """Get the next image from the camera as an Image or RawImage. Be sure to close the image when finished. @@ -73,12 +68,9 @@ async def get_images(self, *, timeout: Optional[float] = None, **kwargs) -> Tupl ... @abc.abstractmethod - async def get_point_cloud(self, - *, - extra: Optional[Dict[str, Any]] = None, - timeout: Optional[float] = None, - **kwargs - ) -> Tuple[bytes, str]: + async def get_point_cloud( + self, *, extra: Optional[Dict[str, Any]] = None, timeout: Optional[float] = None, **kwargs + ) -> Tuple[bytes, str]: """ Get the next point cloud from the camera. This will be returned as bytes with a mimetype describing diff --git a/src/viam/components/camera/client.py b/src/viam/components/camera/client.py index 37db0b564..8da426da5 100644 --- a/src/viam/components/camera/client.py +++ b/src/viam/components/camera/client.py @@ -43,12 +43,9 @@ def __init__(self, name: str, channel: Channel): self.client = CameraServiceStub(channel) super().__init__(name) - async def get_image(self, - mime_type: str = "", - *, - extra: Optional[Dict[str, Any]] = None, - timeout: Optional[float] = None - ) -> Union[Image.Image, RawImage]: + async def get_image( + self, mime_type: str = "", *, extra: Optional[Dict[str, Any]] = None, timeout: Optional[float] = None + ) -> Union[Image.Image, RawImage]: if extra is None: extra = {} request = GetImageRequest(name=self.name, mime_type=mime_type, extra=dict_to_struct(extra))