From 0d8c08588db62912e7ca9c80539e5d9cb4aad947 Mon Sep 17 00:00:00 2001 From: Devin Burke Date: Thu, 21 Nov 2024 10:39:32 +0100 Subject: [PATCH] Fixed linting. NonSupportedFeature is not a recognizable import symbol because of something in pytango so type checking needs to ignore it. --- src/ophyd_async/tango/signal/_signal.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/ophyd_async/tango/signal/_signal.py b/src/ophyd_async/tango/signal/_signal.py index b8cd98c68d..ab173e35dd 100644 --- a/src/ophyd_async/tango/signal/_signal.py +++ b/src/ophyd_async/tango/signal/_signal.py @@ -16,7 +16,14 @@ SignalW, SignalX, ) -from tango import AttrDataFormat, AttrWriteType, CmdArgType, DeviceProxy, DevState, NonSupportedFeature +from tango import ( + AttrDataFormat, + AttrWriteType, + CmdArgType, + DeviceProxy, + DevState, + NonSupportedFeature, # type: ignore +) from tango.asyncio import DeviceProxy as AsyncDeviceProxy from ._tango_transport import TangoSignalBackend, get_python_type @@ -177,9 +184,8 @@ async def infer_signal_type( try: if tr_name in dev_proxy.get_pipe_list(): raise NotImplementedError("Pipes are not supported") - except NonSupportedFeature: - pass - + except NonSupportedFeature: # type: ignore + pass if tr_name not in dev_proxy.get_attribute_list(): if tr_name not in dev_proxy.get_command_list():