data module passes all ruff checks
This commit is contained in:
@@ -2,15 +2,11 @@
|
||||
# provides data to experiment script and display
|
||||
|
||||
import sys
|
||||
import types
|
||||
import tables
|
||||
import collections
|
||||
import threading
|
||||
import traceback
|
||||
import io
|
||||
from . import ADC_Result
|
||||
from . import Accumulation
|
||||
from . import MeasurementResult
|
||||
|
||||
class DataPool(collections.abc.MutableMapping):
|
||||
"""
|
||||
@@ -103,8 +99,8 @@ class DataPool(collections.abc.MutableMapping):
|
||||
self.__dictlock.release()
|
||||
|
||||
def __send_event(self, _event):
|
||||
for l in self.__registered_listeners:
|
||||
l(_event.copy())
|
||||
for listeners in self.__registered_listeners:
|
||||
listeners(_event.copy())
|
||||
|
||||
def __del__(self):
|
||||
self.__send_event(DataPool.Event(DataPool.Event.destroy))
|
||||
@@ -124,13 +120,14 @@ class DataPool(collections.abc.MutableMapping):
|
||||
self.__dictlock.release()
|
||||
try:
|
||||
for key in dict_keys:
|
||||
if key[:2]=="__": continue
|
||||
if key.startswith("__"):
|
||||
continue
|
||||
dump_dir=dump_group
|
||||
# walk along the given path and create groups if necessary
|
||||
namelist = key.split("/")
|
||||
for part in namelist[:-1]:
|
||||
dir_part="dir_"+str(part).translate(DataPool.translation_table)
|
||||
if not dir_part in dump_dir:
|
||||
if dir_part not in dump_dir:
|
||||
dump_dir=dump_file.create_group(dump_dir,name=dir_part,title=part)
|
||||
else:
|
||||
if dump_dir._v_children[dir_part]._v_title==part:
|
||||
|
||||
Reference in New Issue
Block a user