Skip to content

Commit

Permalink
resolving a few formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
awalter-bnl committed Jun 19, 2024
1 parent ed6e3e9 commit 0299f3a
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/ari_sxn_common/common_ophyd.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
import re


class PrettyStrForDevices():
# noinspection PyUnresolvedReferences,PyProtectedMember
class PrettyStrForDevices:
"""
A class that provides a better print and tab-to-complete functionality`
Expand Down Expand Up @@ -50,8 +51,8 @@ def __str__(self):
labels = {'unknown', }
for label in labels:
signals[label].append(
getattr(self, signal).__str__().replace(f'{self.name}_',
''))
getattr(self, signal).__str__().replace(
f'{self.name}_', ''))

try:
self_label = self._ophyd_labels_
Expand Down Expand Up @@ -86,7 +87,8 @@ def __dir__(self):
return attribute_list


class PrettyStrForSignal():
# noinspection PyUnresolvedReferences
class PrettyStrForSignal:
"""
A class that provides a better string when using `print(PrettyStr)`
Expand Down Expand Up @@ -142,6 +144,7 @@ def __dir__(self):
return attribute_list


# noinspection PyUnresolvedReferences
class ID29EpicsMotor(PrettyStrForSignal, EpicsMotor):
"""
Updates ophyd.EpicsMotor with a str method from PrettyStrForSignal
Expand Down Expand Up @@ -176,6 +179,7 @@ def __init__(self, *args, **kwargs):
self.user_readback.kind = 'hinted'


# noinspection PyUnresolvedReferences
class ID29EpicsSignalRO(PrettyStrForSignal, EpicsSignalRO):
"""
Updates ophyd.EpicsSignalRO with a str method from PrettyStrForSignal
Expand All @@ -200,7 +204,7 @@ class ID29EpicsSignalRO(PrettyStrForSignal, EpicsSignalRO):
"""


class ID29EM(PrettyStrForSignal,NSLS_EM):
class ID29EM(PrettyStrForSignal, NSLS_EM):
"""
A 29-ID specific version of the NSLS_EM quadEM device.
Expand Down Expand Up @@ -331,7 +335,6 @@ def __init__(self, *args, **kwargs):
array_counter = ADComponent(EpicsSignal, 'ArrayCounter',
kind='config', timeout=10)


cam = Component(ProsilicaCam, "cam1:", kind='normal')


Expand Down Expand Up @@ -389,6 +392,7 @@ class DeviceWithLocations(PrettyStrForDevices, Device):
`_locations_data` attribute.
"""

# noinspection PyUnresolvedReferences
class LocationSignal(PrettyStrForSignal, Signal):
"""
An InternalSignal class to be used for updating the 'location' signal
Expand Down

0 comments on commit 0299f3a

Please sign in to comment.