andialbrecht / sqlparse

A non-validating SQL parser module for Python
BSD 3-Clause "New" or "Revised" License
3.71k stars 693 forks source link

Fix token matching by always returning a tuple #748

Closed barsa-net closed 9 months ago

barsa-net commented 10 months ago

When _token_matching is given start=None it does an early exit, but it only return a single None instead of a tuple.

This PR ensure that _token_matching returns a tuple of None in such case

Fixes #747