MCPcopy Index your code
hub / github.com/andialbrecht/sqlparse / align_comments

Function align_comments

sqlparse/engine/grouping.py:420–427  ·  view source on GitHub ↗
(tlist)

Source from the content-addressed store, hash-verified

418
419@recurse()
420def align_comments(tlist):
421 tidx, token = tlist.token_next_by(i=sql.Comment)
422 while token:
423 pidx, prev_ = tlist.token_prev(tidx)
424 if isinstance(prev_, sql.TokenList):
425 tlist.group_tokens(sql.TokenList, pidx, tidx, extend=True)
426 tidx = pidx
427 tidx, token = tlist.token_next_by(i=sql.Comment, idx=tidx)
428
429
430def group_values(tlist):

Callers

nothing calls this directly

Calls 3

token_next_byMethod · 0.80
token_prevMethod · 0.80
group_tokensMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…