Skip to content

Commit 9e24810

Browse files
authored
Merge pull request #210 from BCDA-APS/209-superclass-init
`devices` call to superclass `__init__()`
2 parents fb6f5fb + 151f8ee commit 9e24810

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

CHANGES.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Change History
66

77
:1.1.10: release *tba* : updates & bug fix
88

9+
* `#209 <https://github.com/BCDA-APS/apstools/issues/209>`_
10+
``devices`` call to superclass ``__init__()``
911
* `#207 <https://github.com/BCDA-APS/apstools/issues/207>`_
1012
``show_ophyd_symbols`` also shows labels
1113
* `#206 <https://github.com/BCDA-APS/apstools/issues/206>`_

apstools/devices.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,7 +1583,7 @@ def AD_warmed_up(detector):
15831583
return verdict
15841584

15851585

1586-
class AD_EpicsHdf5FileName(FileStorePluginBase):
1586+
class AD_EpicsHdf5FileName(FileStorePluginBase): # lgtm [py/missing-call-to-init]
15871587
"""
15881588
custom class to define image file name from EPICS
15891589
@@ -1687,7 +1687,7 @@ class MySimDetector(SingleTrigger, SimDetector):
16871687
"""
16881688

16891689
def __init__(self, *args, **kwargs):
1690-
FileStorePluginBase.__init__(*args, **kwargs)
1690+
FileStorePluginBase.__init__(self, *args, **kwargs)
16911691
self.filestore_spec = 'AD_HDF5' # spec name stored in resource doc
16921692
self.stage_sigs.update([
16931693
('file_template', '%s%s_%4.4d.h5'),

apstools/signals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
logger = logging.getLogger(__name__).addHandler(logging.NullHandler())
2727

2828

29-
class SynPseudoVoigt(ophyd.sim.SynSignal):
29+
class SynPseudoVoigt(ophyd.sim.SynSignal): # lgtm [py/missing-call-to-init]
3030
"""
3131
Evaluate a point on a pseudo-Voigt based on the value of a motor.
3232

apstools/utils.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,17 +223,16 @@ def list_recent_scans(num=20, keys=[], printing=True, db=None):
223223
global_db = None
224224
db = db or global_db
225225

226-
keys.insert(0, "plan_name")
227-
keys.insert(0, "scan_id")
226+
labels = "scan_id plan_name".split() + keys
228227

229228
table = pyRestTable.Table()
230-
table.labels = "short_uid date/time".split() + keys
229+
table.labels = "short_uid date/time".split() + labels
231230

232231
for h in db[-abs(num):]:
233232
row = [
234233
h.start["uid"][:7],
235234
datetime.datetime.fromtimestamp(h.start['time']),
236-
] + [h.start.get(k, "") for k in keys]
235+
] + [h.start.get(k, "") for k in labels]
237236
table.addRow(row)
238237

239238
if printing:

0 commit comments

Comments
 (0)