It would've been nice if you'd have separated the commits into one single "cleanup" commit and one commit with actual changes. This way, it is really hard to review.
Apart from that, I don't see many changes which are not simple reformattings. I noticed that there are still many usages of psycopg.sql in dev/tests/base.py, is this intended or do you plan to clean that up as well?
It is intended to use some psycopg.sql, because python-sql has some limitations:
only dml-, but no ddl-support
only implementation for standard sql. Some special features of postgres are not implemented intentionally
IMO python-sql is helpful to write the usual dml-sql, for special cases we need the (harder) psycopg.sql
It is intended to use some psycopg.sql, because python-sql has some limitations:
IMO python-sql is helpful to write the usual dml-sql, for special cases we need the (harder) psycopg.sql