--- a/src/eric7/Utilities/ClassBrowsers/rbclbr.py Mon Feb 19 19:37:00 2024 +0100 +++ b/src/eric7/Utilities/ClassBrowsers/rbclbr.py Thu Feb 22 16:26:46 2024 +0100 @@ -295,24 +295,25 @@ fsInterface = ericApp().getObject("EricServer").getServiceInterface("FileSystem") if searchPath and FileSystemUtilities.isRemoteFileName(searchPath[0]): - type = ClassBrowsers.determineSourceType(module) + sourceType = ClassBrowsers.determineSourceType(module) file = fsInterface.join(searchPath[0], module) else: # search the path for the module fullpath = [] if searchPath is None else searchPath[:] - f, file, (suff, mode, type) = ClassBrowsers.find_module(module, fullpath) + f, file, (suff, mode, sourceType) = ClassBrowsers.find_module(module, fullpath) if f: f.close() - if type not in SUPPORTED_TYPES: + if sourceType not in SUPPORTED_TYPES: # not Ruby source, can't do anything with this module return {} try: - if FileSystemUtilities.isRemoteFileName(file): - src = fsInterface.readEncodedFile(file)[0] - else: - src = Utilities.readEncodedFile(file)[0] + src = ( + fsInterface.readEncodedFile(file)[0] + if FileSystemUtilities.isRemoteFileName(file) + else Utilities.readEncodedFile(file)[0] + ) except (OSError, UnicodeError): # can't do anything with this module return {}