Whole file

andialbrecht/sqlparse

The author described this change as Fix handling of semicolon when grouping assignments (fixes #359).. It counts as a record because the check below fails on the code as it stood at d7a290c43 and passes on 097478e47, with nothing else changed between the two runs.

Fix saved2017-09-24
Sharing licenceBSD-3-Clause · LICENSE
Change size+1 1

What the code was meant to do, written into the code itself as a save note

Fix handling of semicolon when grouping assignments (fixes #359).

The change

134134 return token.match(T.Assignment, ':=')
135135
136136 def valid(token):
137- return token is not None
137+ return token is not None and token.ttype not in (T.Keyword)
138138
139139 def post(tlist, pidx, tidx, nidx):
140140 m_semicolon = T.Punctuation, ';'

The check that tells the two apart

failpass·tests/test_regressions.py::test_issue359_index_error_assignments[SELECT

Check file tests/test_regressions.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before itd7a290c43708b3a743472db34e0519159d8ee134
Broken version dated2017-09-21
Modulesqlparse.engine.grouping
Units changedgroup_assignment
Fingerprintf55912b7c9099d6f
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in andialbrecht/sqlparse