(
# What we're doing here is trying to get rid of variable
# declarations that don't have initializer parts.
- # First, bare types between a comma and a trailing semicolon go away.
- (r"(\n[ \t]*)((?:%(type)s).*)(,\s*%(id)s\s*);", r"\1\2;"),
- # But bare classes between comma and semicolon get a following initializer
- (r"(\n[ \t]*)(%(cls)s)(.*,\s)*(%(id)s)(\s*;)", r"\1\2\3\4 = \2()\5;"),
- # Bare ids between commas in a declaration line go away.
- (r"(\n[ \t]*(?:%(type)s)\s+.*,)(%(id)s),(.*);", r"\1\3"),
- # But bare class names between commas get an initializer
- (r"(\n[ \t]*)(%(cls)s)(\s+.*,)(%(id)s),(.*);", r"\1\2\3\4 =\2(),\5"),
# Bare ids just after the type and before a comma or semi go away.
(r"(\n[ \t]*(?:%(type)s))(\s*%(id)s)([;,])", r"\1\3"),
# Bare ids after class names and before comma or semi get an initializer.
(r"(\n[ \t]*)(%(cls)s)(\s*%(id)s)([;,])", r"\1\2\3 = \2()\4"),
+ # Bare types between a comma and a trailing semicolon go away.
+ (r"(\n[ \t]*)((?:%(type)s).*)(,\s*%(id)s\s*);", r"\1\2;"),
+ # But bare classes between comma and semicolon get a following initializer
+ (r"(\n[ \t]*)(%(cls)s)(.*,\s)*(%(id)s)(\s*;)", r"\1\2\3\4 = \2()\5"),
+ # Bare ids between commas in a declaration line go away.
+ (r"(\n[ \t]*(?:%(type)s)\s+.*)(,\s*%(id)s),(.*);", r"\1\3"),
+ # But bare class names between commas get an initializer
+ (r"(\n[ \t]*)(%(cls)s)(\s+.*,)(\s*%(id)s),(.*);", r"\1\2\3\4 = \2(),\5"),
# Any declaration line not containing an initializer goes away.
(r"\n[ \t]*(?:%(type)s|%(cls)s)[^=;]*;", ""),
),