This commit is contained in:
2023-02-01 15:31:31 +01:00
parent b380d840fc
commit 9db8d5b87e
3 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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)

View File

@ -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]