From 2eea66795df84e5fbcbd55b5203597418edf4cc1 Mon Sep 17 00:00:00 2001 From: Max Rakitin Date: Thu, 23 May 2024 17:59:31 -0400 Subject: [PATCH] STY: fix pre-commit issues --- src/srx_caproto_iocs/axis/caproto_ioc.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/srx_caproto_iocs/axis/caproto_ioc.py b/src/srx_caproto_iocs/axis/caproto_ioc.py index 95f3f99..286edd3 100644 --- a/src/srx_caproto_iocs/axis/caproto_ioc.py +++ b/src/srx_caproto_iocs/axis/caproto_ioc.py @@ -1,14 +1,12 @@ from __future__ import annotations -import requests -from PIL import Image, ImageFont, ImageDraw -from io import BytesIO - import textwrap -from enum import Enum +from io import BytesIO +import requests from caproto import ChannelType from caproto.server import pvproperty, run, template_arg_parser +from PIL import Image from ..base import CaprotoSaveIOC, check_args from ..utils import now, save_image @@ -18,7 +16,7 @@ class AxisSaveIOC(CaprotoSaveIOC): """Axis caproto save IOC.""" - + common_kwargs = {"max_length": 255, "string_encoding": "utf-8"} key1 = pvproperty( @@ -40,9 +38,7 @@ def __init__(self, *args, camera_host=None, **kwargs): print(f"{camera_host = }") super().__init__(*args, **kwargs) - async def _get_current_dataset( - self, *args, **kwargs - ): + async def _get_current_dataset(self, *args, **kwargs): url = f"http://{self._camera_host}/axis-cgi/jpg/image.cgi" resp = requests.get(url) img = Image.open(BytesIO(resp.content)) @@ -84,7 +80,8 @@ def saver(request_queue, response_queue): ) parser.add_argument( - "-c", "--camera-host", + "-c", + "--camera-host", help="The camera hostname, e.g., 'xf06bm-cam5'", required=True, type=str,