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