diff --git a/Lib/pyclbr.py b/Lib/pyclbr.py index 6af46920743..25fc33f44e0 100644 --- a/Lib/pyclbr.py +++ b/Lib/pyclbr.py @@ -42,8 +42,8 @@ blank_line = re.compile('^[ \t]*($|#)') is_class = re.compile('^class[ \t]+(?P'+id+')[ \t]*(?P\([^)]*\))?[ \t]*:') is_method = re.compile('^[ \t]+def[ \t]+(?P'+id+')[ \t]*\(') -is_import = re.compile('^import[ \t]*(?P[^#]+)') -is_from = re.compile('^from[ \t]+(?P'+id+'([ \t]*\\.[ \t]*'+id+')*)[ \t]+import[ \t]+(?P[^#]+)') +is_import = re.compile('^import[ \t]*(?P[^#;]+)') +is_from = re.compile('^from[ \t]+(?P'+id+'([ \t]*\\.[ \t]*'+id+')*)[ \t]+import[ \t]+(?P[^#;]+)') dedent = re.compile('^[^ \t]') indent = re.compile('^[^ \t]*')