src/eric7/MicroPython/MicroPythonFileManagerWidget.py

branch
eric7
changeset 10690
fab36645aa7d
parent 10523
e4069ddd7dc7
child 10806
2f6df822e3b9
equal deleted inserted replaced
10689:3ede487187f2 10690:fab36645aa7d
423 if itm.data(0, Qt.ItemDataRole.UserRole) in expanded: 423 if itm.data(0, Qt.ItemDataRole.UserRole) in expanded:
424 itm.setExpanded(True) 424 itm.setExpanded(True)
425 itm = fileTreeWidget.itemBelow(itm) 425 itm = fileTreeWidget.itemBelow(itm)
426 426
427 @pyqtSlot(QTreeWidgetItem, int) 427 @pyqtSlot(QTreeWidgetItem, int)
428 def on_localFileTreeWidget_itemActivated(self, item, column): 428 def on_localFileTreeWidget_itemActivated(self, item, _column):
429 """ 429 """
430 Private slot to handle the activation of a local item. 430 Private slot to handle the activation of a local item.
431 431
432 If the item is a directory, the list will be re-populated for this 432 If the item is a directory, the list will be re-populated for this
433 directory. 433 directory.
434 434
435 @param item reference to the activated item 435 @param item reference to the activated item
436 @type QTreeWidgetItem 436 @type QTreeWidgetItem
437 @param column column of the activation 437 @param _column column of the activation (unused)
438 @type int 438 @type int
439 """ 439 """
440 name = item.data(0, Qt.ItemDataRole.UserRole) 440 name = item.data(0, Qt.ItemDataRole.UserRole)
441 if item.text(0).endswith("/"): 441 if item.text(0).endswith("/"):
442 # directory names end with a '/' 442 # directory names end with a '/'
509 """ 509 """
510 dirname = self.localCwd.text() 510 dirname = self.localCwd.text()
511 self.__repopulateLocalFilesList(dirname=dirname) 511 self.__repopulateLocalFilesList(dirname=dirname)
512 512
513 @pyqtSlot(QTreeWidgetItem, int) 513 @pyqtSlot(QTreeWidgetItem, int)
514 def on_deviceFileTreeWidget_itemActivated(self, item, column): 514 def on_deviceFileTreeWidget_itemActivated(self, item, _column):
515 """ 515 """
516 Private slot to handle the activation of a device item. 516 Private slot to handle the activation of a device item.
517 517
518 If the item is a directory, the current working directory is changed 518 If the item is a directory, the current working directory is changed
519 and the list will be re-populated for this directory. 519 and the list will be re-populated for this directory.
520 520
521 @param item reference to the activated item 521 @param item reference to the activated item
522 @type QTreeWidgetItem 522 @type QTreeWidgetItem
523 @param column column of the activation 523 @param _column column of the activation (unused)
524 @type int 524 @type int
525 """ 525 """
526 name = item.data(0, Qt.ItemDataRole.UserRole) 526 name = item.data(0, Qt.ItemDataRole.UserRole)
527 if self.__repl.deviceSupportsLocalFileAccess(): 527 if self.__repl.deviceSupportsLocalFileAccess():
528 if item.text(0).endswith("/"): 528 if item.text(0).endswith("/"):
828 with a different name. 828 with a different name.
829 """ 829 """
830 self.on_getButton_clicked(getAs=True) 830 self.on_getButton_clicked(getAs=True)
831 831
832 @pyqtSlot(str, str) 832 @pyqtSlot(str, str)
833 def __handleGetDone(self, deviceFile, localFile): 833 def __handleGetDone(self, _deviceFile, localFile):
834 """ 834 """
835 Private slot handling a successful copy of a file from the device. 835 Private slot handling a successful copy of a file from the device.
836 836
837 @param deviceFile name of the file on the device 837 @param _deviceFile name of the file on the device (unused)
838 @type str 838 @type str
839 @param localFile name of the local file 839 @param localFile name of the local file
840 @type str 840 @type str
841 """ 841 """
842 localPath = os.path.dirname(localFile) 842 localPath = os.path.dirname(localFile)
897 mirror=True, 897 mirror=True,
898 localDevice=self.__repl.deviceSupportsLocalFileAccess(), 898 localDevice=self.__repl.deviceSupportsLocalFileAccess(),
899 ) 899 )
900 900
901 @pyqtSlot(str, str) 901 @pyqtSlot(str, str)
902 def __handleRsyncDone(self, localDir, deviceDir): 902 def __handleRsyncDone(self, _localDir, _deviceDir):
903 """ 903 """
904 Private method to handle the completion of the rsync operation. 904 Private method to handle the completion of the rsync operation.
905 905
906 @param localDir name of the local directory 906 @param _localDir name of the local directory (unused)
907 @type str 907 @type str
908 @param deviceDir name of the device directory 908 @param _deviceDir name of the device directory (unused)
909 @type str 909 @type str
910 """ 910 """
911 # simulate button presses to reload the two lists 911 # simulate button presses to reload the two lists
912 self.on_localReloadButton_clicked() 912 self.on_localReloadButton_clicked()
913 self.on_deviceReloadButton_clicked() 913 self.on_deviceReloadButton_clicked()

eric ide

mercurial