diff -r abde60847db6 -r 0cf5ebf17411 src/eric7/QScintilla/Editor.py --- a/src/eric7/QScintilla/Editor.py Fri Feb 16 09:32:27 2024 +0100 +++ b/src/eric7/QScintilla/Editor.py Fri Feb 16 11:45:08 2024 +0100 @@ -265,9 +265,9 @@ self.project = ericApp().getObject("Project") self.setFileName(fn) - self.__remotefsInterface = ericApp().getObject( - "EricServer" - ).getServiceInterface("FileSystem") + self.__remotefsInterface = ( + ericApp().getObject("EricServer").getServiceInterface("FileSystem") + ) # clear some variables self.lastHighlight = None # remember the last highlighted line @@ -3730,8 +3730,7 @@ path = "" else: path = ( - Preferences.getMultiProject("Workspace") - or OSUtilities.getHomeDir() + Preferences.getMultiProject("Workspace") or OSUtilities.getHomeDir() ) if self.fileName: @@ -3775,12 +3774,9 @@ if ex: fpath = fpath.with_suffix(ex) if ( - ( - FileSystemUtilities.isRemoteFileName(str(fpath)) - and self.__remotefsInterface.exists(str(fpath)) - ) - or (FileSystemUtilities.isPlainFileName(str(fpath)) and fpath.exists()) - ): + FileSystemUtilities.isRemoteFileName(str(fpath)) + and self.__remotefsInterface.exists(str(fpath)) + ) or (FileSystemUtilities.isPlainFileName(str(fpath)) and fpath.exists()): res = EricMessageBox.yesNo( self, title, @@ -6515,11 +6511,6 @@ ) self.coverageHideAnnotationMenuAct.setEnabled(len(self.notcoveredMarkers) > 0) - # disable actions not supporting eric-ide server - self.codeMetricsAct.setEnabled( - False if fn is None else FileSystemUtilities.isPlainFileName(fn) - ) - # TODO: disable action in Radon plugin for server files self.showMenu.emit("Show", self.menuShow, self) @@ -7056,9 +7047,9 @@ if fn: if FileSystemUtilities.isRemoteFileName(fn): - coverageInterface = ericApp().getObject( - "EricServer" - ).getServiceInterface("Coverage") + coverageInterface = ( + ericApp().getObject("EricServer").getServiceInterface("Coverage") + ) ok, error = coverageInterface.loadCoverageData(fn) if not ok and not silent: EricMessageBox.critical( @@ -8317,9 +8308,7 @@ signal if there was an attribute change. @type bool """ - if self.fileName == "" or FileSystemUtilities.isDeviceFileName( - self.fileName - ): + if self.fileName == "" or FileSystemUtilities.isDeviceFileName(self.fileName): return readOnly = self.checkReadOnly() @@ -8348,7 +8337,8 @@ or ( FileSystemUtilities.isRemoteFileName(self.fileName) and not self.__remotefsInterface.access( - FileSystemUtilities.plainFileName(self.fileName), "write") + FileSystemUtilities.plainFileName(self.fileName), "write" + ) ) or self.isReadOnly() ) @@ -8438,9 +8428,9 @@ ): plainFilename = FileSystemUtilities.plainFileName(filename) if self.__remotefsInterface.exists(plainFilename): - mtime = self.__remotefsInterface.stat( - plainFilename, ["st_mtime"] - )["st_mtime"] + mtime = self.__remotefsInterface.stat(plainFilename, ["st_mtime"])[ + "st_mtime" + ] return mtime != self.lastModified elif (