-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use python-sql instead of psycopg.sql for generating sql-queries #83
use python-sql instead of psycopg.sql for generating sql-queries #83
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
dev/src/db_utils.py
Outdated
|
||
from psycopg import Cursor, sql | ||
from sql import Column, Table # type: ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the following section to the setup.cfg
to not have to add # type: ignore
everytime you import something from the sql
package:
[mypy-sql]
ignore_missing_imports = true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I did yesterday and now tried again, but the errors stayed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
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 |
No description provided.