-
Notifications
You must be signed in to change notification settings - Fork 11
test: Fix insert rowcount #242
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
Conversation
|
Kudos, SonarCloud Quality Gate passed! |
| Column(d["name"], parse_type(d["type"]), None, None, None, None, None) | ||
| for d in query_data["meta"] | ||
| ] | ||
| if not descriptions: |
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.
Why can't we just have it empty?
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.
Ok, pep 249 says it should be None
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.
I feel like it's a bit counter-intuitive to receive empty array in description. For example,
A user does an INSERT query, checks cursor.rowcount is correct then checks for some reason cursor.description and it's []. The name itself implies singular as well.
I don't feel too strongly about it, but this is also how we had it up until now.
| Column(d["name"], parse_type(d["type"]), None, None, None, None, None) | ||
| for d in query_data["meta"] | ||
| ] | ||
| if not descriptions: |
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.
Ok, pep 249 says it should be None








With the latest changes to aragog API behaviour has changed. Modifying our tests to account for it.