diff -r 2eb7b5516a60 -r 0cf5dda5512f src/eric7/MicroPython/Devices/CircuitPythonDevices.py --- a/src/eric7/MicroPython/Devices/CircuitPythonDevices.py Thu Mar 09 14:55:17 2023 +0100 +++ b/src/eric7/MicroPython/Devices/CircuitPythonDevices.py Thu Mar 09 16:56:24 2023 +0100 @@ -39,7 +39,9 @@ DeviceVolumeName = "CIRCUITPY" - def __init__(self, microPythonWidget, deviceType, boardName, parent=None): + def __init__( + self, microPythonWidget, deviceType, boardName, hasWorkspace=True, parent=None + ): """ Constructor @@ -49,6 +51,9 @@ @type str @param boardName name of the board @type str + @param hasWorkspace flag indicating that the devices supports access via + a mounted volume (defaults to True) + @type bool (optional) @param parent reference to the parent object @type QObject """ @@ -57,7 +62,10 @@ self._submitMode = "paste" # use 'paste' mode to avoid loosing state self.__boardName = boardName - self.__workspace = self.__findWorkspace() + + self.__workspace = ( + self.__findWorkspace() if hasWorkspace else None + ) self.__updater = CircuitPythonUpdaterInterface(self) @@ -300,7 +308,7 @@ self.__cpyMenu = QMenu(self.tr("CircuitPython Functions")) self.__cpyMenu.addAction( - self.tr("Show CircuitPython Versions"), self.__showCircuitPythonVersions + self.tr("Show CircuitPython Versions"), self.showCircuitPythonVersions ) self.__cpyMenu.addSeparator() self.__flashCpyAct = self.__cpyMenu.addMenu(self.__flashMenu) @@ -473,9 +481,9 @@ flashAddonFirmware(self.microPython.getCurrentPort()) @pyqtSlot() - def __showCircuitPythonVersions(self): + def showCircuitPythonVersions(self): """ - Private slot to show the CircuitPython version of a connected device and + Public slot to show the CircuitPython version of a connected device and the latest available one (from Github). """ ui = ericApp().getObject("UserInterface")