@@ -1375,7 +1375,7 @@ def analyzeline(m, case, line):
1375
1375
value = ''
1376
1376
init_list = ''
1377
1377
state = 0
1378
- quote_open = 1
1378
+ quote_open = True
1379
1379
paren_open = 0
1380
1380
1381
1381
for c in m .group ('after' ):
@@ -1429,30 +1429,21 @@ def analyzeline(m, case, line):
1429
1429
# Ignoring since data statements are irrelevant for
1430
1430
# wrapping.
1431
1431
continue
1432
- fc = 0
1433
- pair_type = groupcache [groupcounter ]['vars' ][pair [0 ]]['typespec' ]
1434
- if pair_type == 'complex' :
1435
- while (index < llen ):
1436
- if pair [1 ][index ] == "'" :
1437
- fc = not fc
1438
- index = index + 1
1439
- index = index + 1
1440
- if name not in variables :
1441
- variables [name ] = {}
1442
- if '=' in variables [name ] and not variables [name ]['=' ] == pair [1 ][end_index :index - 1 ]:
1443
- outmess ('analyzeline: changing init expression of "%s" ("%s") to "%s"\n ' % (
1444
- name , variables [name ]['=' ], pair [1 ][end_index :index - 1 ]))
1445
- else :
1446
- while (index < llen ) and (fc or not pair [1 ][index ] == ',' ):
1447
- if pair [1 ][index ] == "'" :
1448
- fc = not fc
1449
- index = index + 1
1450
- index = index + 1
1451
- if name not in variables :
1452
- variables [name ] = {}
1453
- if '=' in variables [name ] and not variables [name ]['=' ] == pair [1 ][end_index :index - 1 ]:
1454
- outmess ('analyzeline: changing init expression of "%s" ("%s") to "%s"\n ' % (
1455
- name , variables [name ]['=' ], pair [1 ][end_index :index - 1 ]))
1432
+ quote_open = 0
1433
+ try :
1434
+ pair_type = groupcache [groupcounter ]['vars' ][pair [0 ]]['typespec' ]
1435
+ except KeyError :
1436
+ pair_type = None
1437
+ while index < llen and (pair_type == 'complex' or (quote_open or pair [1 ][index ] != ',' )):
1438
+ if pair [1 ][index ] == "'" :
1439
+ quote_open = not quote_open
1440
+ index += 1
1441
+ index = index + 1
1442
+ if name not in variables :
1443
+ variables [name ] = {}
1444
+ if '=' in variables [name ] and not variables [name ]['=' ] == pair [1 ][end_index :index - 1 ]:
1445
+ outmess ('analyzeline: changing init expression of "%s" ("%s") to "%s"\n ' % (
1446
+ name , variables [name ]['=' ], pair [1 ][end_index :index - 1 ]))
1456
1447
variables [name ]['=' ] = pair [1 ][end_index :index - 1 ]
1457
1448
end_index = index
1458
1449
last_variable = name
0 commit comments