There is demand for sqlfluff which is not a python tool.
Maybe using sqlglot like sqlnbfmt does is easier.
PS: I tried sqlnbfmt and while it is formatting my notebooks it is also removing all comments in the code.
See: sqlfluff/sqlfluff#4143
See: https://github.com/flyersworder/sqlnbfmt
There is demand for sqlfluff which is not a python tool.
Maybe using sqlglot like sqlnbfmt does is easier.
PS: I tried sqlnbfmt and while it is formatting my notebooks it is also removing all comments in the code.
See: sqlfluff/sqlfluff#4143
See: https://github.com/flyersworder/sqlnbfmt