Skip to content
This repository was archived by the owner on May 6, 2026. It is now read-only.

Fix Model._gql. - #223

Merged
chrisrossi merged 2 commits into
googleapis:masterfrom
chrisrossi:Model._gql
Oct 16, 2019
Merged

Fix Model._gql.#223
chrisrossi merged 2 commits into
googleapis:masterfrom
chrisrossi:Model._gql

Conversation

@chrisrossi

Copy link
Copy Markdown
Contributor

Binding parameters in Model._gql was broken due to a misplaced
parenthesis. Fixes#222.

Binding parameters in `Model._gql` was broken due to a misplaced
parenthesis. Fixesgoogleapis#222.
@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 16, 2019

@cguardiacguardia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching that one.

Comment threadgoogle/cloud/ndb/model.py Outdated
)
"SELECT * FROM {} {}".format(cls._class_name(), query_string),
*args,
**kwargs,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The trailing comma here is not valid in Python 2.7. We might as well remove it now.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, well. Blacken added it. That's kind of a conundrum...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, yes, that's a problem. In this case, it might be enough to put them in the same line, but for longer call signatures it could get ugly.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found a way to make blacken happy and get rid of that comma.

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GQL: Binding error in Model.gql

3 participants

@chrisrossi@cguardia@googlebot