mirror of
https://github.com/borgbase/vorta
synced 2025-01-03 13:45:49 +00:00
fix trivial flake8 fails
This commit is contained in:
parent
33e3b71caf
commit
e02b241762
2 changed files with 9 additions and 5 deletions
|
@ -949,10 +949,13 @@
|
|||
rcc_version = 2
|
||||
qt_resource_struct = qt_resource_struct_v2
|
||||
|
||||
|
||||
def qInitResources():
|
||||
QtCore.qRegisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data)
|
||||
|
||||
|
||||
def qCleanupResources():
|
||||
QtCore.qUnregisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data)
|
||||
|
||||
|
||||
qInitResources()
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
ExtractDialogUI, ExtractDialogBase = uic.loadUiType(uifile)
|
||||
n = 0
|
||||
|
||||
|
||||
class ExtractDialog(ExtractDialogBase, ExtractDialogUI):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
@ -25,7 +26,7 @@ def __init__(self):
|
|||
'another key2': ['value2', 'value', 'value4']}
|
||||
for j in range(50):
|
||||
d[f'folder-{i}'][f'large folder {j}'] = {'another key1': 'another value1',
|
||||
'another key2': ['value2', 'value', 'value4']}
|
||||
'another key2': ['value2', 'value', 'value4']}
|
||||
|
||||
# add top-level folders to test scroll performance
|
||||
for f in range(1000000):
|
||||
|
@ -50,6 +51,7 @@ def build_tree(self):
|
|||
fill_item(self.fileTree.invisibleRootItem(), self.d)
|
||||
print('Added test items', n)
|
||||
|
||||
|
||||
def fill_item(item, value):
|
||||
global n
|
||||
# item.setExpanded(True)
|
||||
|
@ -62,7 +64,7 @@ def fill_item(item, value):
|
|||
child.setFlags(child.flags() | Qt.ItemIsUserCheckable)
|
||||
child.setCheckState(0, Qt.Unchecked)
|
||||
item.addChild(child)
|
||||
n+=1
|
||||
n += 1
|
||||
fill_item(child, val)
|
||||
elif type(value) is list:
|
||||
for val in value:
|
||||
|
@ -70,7 +72,7 @@ def fill_item(item, value):
|
|||
child.setFlags(child.flags() | Qt.ItemIsUserCheckable)
|
||||
child.setCheckState(0, Qt.Unchecked)
|
||||
item.addChild(child)
|
||||
n+=1
|
||||
n += 1
|
||||
if type(val) is dict:
|
||||
child.setText(0, '[dict]')
|
||||
fill_item(child, val)
|
||||
|
@ -85,5 +87,4 @@ def fill_item(item, value):
|
|||
child.setFlags(child.flags() | Qt.ItemIsUserCheckable)
|
||||
child.setCheckState(0, Qt.Unchecked)
|
||||
item.addChild(child)
|
||||
n+=1
|
||||
|
||||
n += 1
|
||||
|
|
Loading…
Reference in a new issue