cleanup
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
from PyQt5.QtWidgets import QWidget, QLineEdit, QVBoxLayout
|
||||
from PyQt5.QtWidgets import QWidget, QVBoxLayout
|
||||
|
||||
from .dictlistwidget import DictListWidget
|
||||
from .searchbox import SearchBox
|
||||
|
@ -47,7 +47,7 @@ class SearchBox(QWidget):
|
||||
|
||||
class SquareButton(QPushButton):
|
||||
|
||||
def resizeEvent(self, e):
|
||||
def resizeEvent(self, _event):
|
||||
height = self.height()
|
||||
self.setMinimumWidth(height)
|
||||
|
||||
|
@ -31,7 +31,7 @@ def read_dict(fn):
|
||||
data = node[()]
|
||||
if isinstance(data, bytes):
|
||||
data = data.decode("utf-8")
|
||||
res[node.name] = data
|
||||
res[name] = data
|
||||
|
||||
with h5py.File(fn, "r") as f:
|
||||
f.visititems(visit)
|
||||
@ -44,7 +44,7 @@ def unflatten_dict(d, sep="/"):
|
||||
for k, v in d.items():
|
||||
current = res
|
||||
levels = k.split(sep)
|
||||
for l in levels[1:-1]:
|
||||
for l in levels[:-1]:
|
||||
if l not in current:
|
||||
current[l] = {}
|
||||
current = current[l]
|
||||
|
Reference in New Issue
Block a user