Skip to content

Commit

Permalink
I think I finall got pycharm to stop fighting me?
Browse files Browse the repository at this point in the history
  • Loading branch information
lisazacarias committed Apr 4, 2024
1 parent 04a1ae1 commit 160447a
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions lcls_tools/common/controls/pyepics/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ def __init__(
access_callback=None,
):
super().__init__(
pvname=pvname,
connection_timeout=connection_timeout,
callback=callback,
form=form,
verbose=verbose,
auto_monitor=auto_monitor,
count=count,
connection_callback=connection_callback,
access_callback=access_callback,
pvname=pvname,
connection_timeout=connection_timeout,
callback=callback,
form=form,
verbose=verbose,
auto_monitor=auto_monitor,
count=count,
connection_callback=connection_callback,
access_callback=access_callback,
)

def __str__(self):
Expand All @@ -52,11 +52,11 @@ def caget(self, count=None, as_string=False, as_numpy=True, use_monitor=True):
if attempt > 3:
raise PVInvalidError(f"{self} caget failed 3 times, aborting")
value = epics_caget(
self.pvname,
as_string=as_string,
count=count,
as_numpy=as_numpy,
use_monitor=use_monitor,
self.pvname,
as_string=as_string,
count=count,
as_numpy=as_numpy,
use_monitor=use_monitor,
)

if value is not None:
Expand Down Expand Up @@ -91,21 +91,21 @@ def get(
):
if use_caget:
return self.caget(
as_string=as_string, as_numpy=as_numpy, use_monitor=use_monitor
as_string=as_string, as_numpy=as_numpy, use_monitor=use_monitor
)

else:
self.connect()

value = super().get(
count, as_string, as_numpy, timeout, with_ctrlvars, use_monitor
count, as_string, as_numpy, timeout, with_ctrlvars, use_monitor
)
if value is not None:
return value
else:
print(f"{self} get failed, trying caget instead")
return self.caget(
as_string=as_string, as_numpy=as_numpy, use_monitor=use_monitor
as_string=as_string, as_numpy=as_numpy, use_monitor=use_monitor
)

def put(
Expand All @@ -123,12 +123,12 @@ def put(
return self.caput(value)

status = super().put(
value,
wait=wait,
timeout=timeout,
use_complete=use_complete,
callback=callback,
callback_data=callback_data,
value,
wait=wait,
timeout=timeout,
use_complete=use_complete,
callback=callback,
callback_data=callback_data,
)

if retry and (status != 1):
Expand Down

0 comments on commit 160447a

Please sign in to comment.