-
Notifications
You must be signed in to change notification settings - Fork 1
docs: missing docstrings for functions & classes #13
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
Release-As: 2.2.a0 Co-authored-by: larkee <[email protected]>
…apis#480) Add googleapis/python-test-utils and system test stub
Release-As: 2.2.a1
fix: Couple of tests are permanently broken while running locally
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
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 still have some comments. @mf2199, could you take a look too?
google/cloud/spanner_dbapi/cursor.py
Outdated
return self._itr | ||
|
||
def fetchone(self): | ||
"""Fetch next resulting row of the last ran query. |
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.
Fetch the next resulting row
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've reviewed the Connection
and Cursor
classes. The rest can be fixed using similar ideas.
google/cloud/spanner_dbapi/cursor.py
Outdated
"""The number of rows produced by the last `.execute()`. | ||
:rtype: int | ||
:returns: The number of rows that last .execute*() produced. |
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.
:returns: The number of rows produced by the last .execute*().
:param params: A list of parameters. | ||
:rtype: dict | ||
:returns: A dictionary of the name to the list of parameters. |
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.
Rephrase, please.
:param params: A list of parameters. | ||
:rtype: list | ||
:returns: A list of tuples of the parameters. |
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.
:returns: A properly restructured list of the parameters.
google/cloud/spanner_dbapi/utils.py
Outdated
:rtype: str | ||
:returns: A SQL parsed by segments in unicode if initial | ||
SQL is valid, initial string otherwise. |
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.
Indentation should match the first description character of the previous line - in this case, A
.
google/cloud/spanner_dbapi/parser.py
Outdated
:rtype: (str, Any) | ||
:returns: A tuple of the rest expression string and tree of already parsed | ||
expression. | ||
:raises :class:`ProgrammingError`: If there is parsing error. |
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.
a parsing error
google/cloud/spanner_dbapi/parser.py
Outdated
:param token: An expression token. | ||
:rtype: (str, Any) | ||
:returns: A tuple of the rest expression string and tree of already parsed |
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.
A tuple containing the rest of the expression string and the tree of the already parsed
google/cloud/spanner_dbapi/parser.py
Outdated
"""Return False if all the arguments have the same length. | ||
:rtype: bool | ||
:return: False if the sequences of arguments have the same length. |
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.
the arguments
google/cloud/spanner_dbapi/parser.py
Outdated
:return: True if all the arguments are in pyformat and have the same | ||
number of arguments, False otherwise. |
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.
arguments have the same number of arguments
?
Rephrase.
:param params: A list of parameters. | ||
:rtype: tuple(str, dict) | ||
:returns: A tuple of sanitized SQL and dictionary of the named arguments. |
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.
A tuple of the sanitized SQL and a dictionary of the named arguments.
1f4932d
to
8183247
Compare
No description provided.