Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 12, 2024
1 parent cc1d1f6 commit 623dcc7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
7 changes: 5 additions & 2 deletions socs/agents/lakeshore240/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
import traceback
import warnings
from dataclasses import dataclass
from typing import ( Any, Dict, Optional, )
from typing import Any, Dict, Optional

import txaio # type: ignore
from ocs import ocs_agent, site_config
from ocs.ocs_twisted import Pacemaker

from socs.Lakeshore.Lakeshore240 import Module
from socs.util import BaseAction, register_task_from_action, OcsOpReturnType
from socs.util import BaseAction, OcsOpReturnType, register_task_from_action

txaio.use_twisted()

Expand All @@ -26,6 +26,7 @@ class LS240Action(BaseAction):
def process(self, module: Module) -> None:
raise NotImplementedError


@dataclass
class UploadCalCurve(LS240Action):
"""upload_cal_curve(channel, filename)
Expand All @@ -50,6 +51,7 @@ def process(self, module: Module) -> None:
time.sleep(0.1)
raise Exception("TEST")


@dataclass
class SetValues(LS240Action):
"""set_values(channel, sensor=None, auto_range=None, range=None,\
Expand Down Expand Up @@ -108,6 +110,7 @@ def process(self, module: Module) -> None:
)
time.sleep(0.1)


class LS240_Agent:
def __init__(
self,
Expand Down
16 changes: 3 additions & 13 deletions socs/util.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
import hashlib
import dataclasses
from typing import (
Optional,
Dict,
Any,
Type,
Callable,
Tuple,
get_origin,
get_args,
Union,
TypeVar,
)
import hashlib
import time
from typing import (Any, Callable, Dict, Optional, Tuple, Type, TypeVar, Union,
get_args, get_origin)

from ocs import ocs_agent

Expand Down

0 comments on commit 623dcc7

Please sign in to comment.