diff -r af03537d56b2 -r 93b496cc3c88 src/eric7/Utilities/ClassBrowsers/jsclbr.py --- a/src/eric7/Utilities/ClassBrowsers/jsclbr.py Sun Dec 11 18:24:41 2022 +0100 +++ b/src/eric7/Utilities/ClassBrowsers/jsclbr.py Mon Dec 12 16:35:21 2022 +0100 @@ -19,15 +19,6 @@ SUPPORTED_TYPES = [ClassBrowsers.JS_SOURCE] -_modules = {} # cache of modules we've seen - - -def clearModulesCache(): - """ - Function to clear the cached modules. - """ - _modules.clear() - class VisibilityMixin(ClbrBaseClasses.ClbrVisibilityMixinBase): """ @@ -306,12 +297,6 @@ @return the resulting dictionary @rtype dict """ - global _modules - - if module in _modules: - # we've seen this file before... - return _modules[module] - # search the path for the file f = None fullpath = [] if path is None else path[:] @@ -319,19 +304,16 @@ if f: f.close() if type not in SUPPORTED_TYPES: - # not CORBA IDL source, can't do anything with this module - _modules[module] = {} + # not Javascript source, can't do anything with this module return {} try: src = Utilities.readEncodedFile(file)[0] except (UnicodeError, OSError): # can't do anything with this module - _modules[module] = {} return {} - _modules[module] = scan(src, file, module) - return _modules[module] + return scan(src, file, module) def scan(src, file, module): @@ -354,5 +336,4 @@ visitor = Visitor(src, module, file) dictionary = visitor.parse() - _modules[module] = dictionary return dictionary