Skip to content

Commit

Permalink
STY: fix pre-commit issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mrakitin committed May 23, 2024
1 parent a2fc5db commit 2eea667
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/srx_caproto_iocs/axis/caproto_ioc.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -18,7 +16,7 @@

class AxisSaveIOC(CaprotoSaveIOC):
"""Axis caproto save IOC."""

common_kwargs = {"max_length": 255, "string_encoding": "utf-8"}

key1 = pvproperty(
Expand All @@ -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))
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 2eea667

Please sign in to comment.