--- a/eric6/Utilities/ClassBrowsers/pyclbr.py Fri Sep 04 18:48:52 2020 +0200 +++ b/eric6/Utilities/ClassBrowsers/pyclbr.py Fri Sep 04 18:50:43 2020 +0200 @@ -25,7 +25,11 @@ _getnext = re.compile( r""" - (?P<String> + (?P<CodingLine> + ^ \# \s* [*_-]* \s* coding[:=] \s* (?P<Coding> [-\w_.]+ ) \s* [*_-]* $ + ) + +| (?P<String> \# .*? $ # ignore everything in comments | \""" [^"\\]* (?: @@ -127,10 +131,6 @@ (?: \( \s* .*? \s* \) ) | (?: [^#;\\\n]* (?: \\\n )* )* ) - ) - -| (?P<CodingLine> - ^ \# \s* [*_-]* \s* coding[:=] \s* (?P<Coding> [-\w_.]+ ) \s* [*_-]* $ )""", re.VERBOSE | re.DOTALL | re.MULTILINE).search @@ -335,11 +335,16 @@ module and return a dictionary with one entry for each class found in the module. - @param module name of the module file (string) - @param path path the module should be searched in (list of strings) + @param module name of the module file + @type str + @param path path the module should be searched in + @type list of str @param inpackage flag indicating a module inside a package is scanned - @param isPyFile flag indicating a Python file (boolean) + @type bool + @param isPyFile flag indicating a Python file + @type bool @return the resulting dictionary + @rtype dict """ global _modules