chore(pyright): fix code for new version

Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
2025-10-08 18:37:31 +05:00
parent 03566da704
commit 49d39b5d61
3 changed files with 19 additions and 12 deletions

View File

@@ -510,8 +510,8 @@ class FileExplorer(QDialog):
"""Update the list of mounted drives and favorite folders."""
for i in reversed(range(self.drives_layout.count())):
item = self.drives_layout.itemAt(i)
if item and item.widget():
widget = item.widget()
widget = item.widget() if item else None
if widget:
self.drives_layout.removeWidget(widget)
widget.deleteLater()