-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Add type annotations #938
Add type annotations #938
Conversation
Automated message from Dropbox CLA bot @hyunchel, thanks for the pull request! It looks like you haven't yet signed the Dropbox CLA. Please sign it here. |
Signed, thanks! |
Automated message from Dropbox CLA bot @hyunchel, thanks for signing the CLA! |
@@ -43,6 +46,7 @@ def fix_row(row): | |||
return content | |||
|
|||
def dictfetchall(cursor): | |||
# type: (Any) -> List[Dict[str, Any]] |
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 think cursor
is of type connection.cursor
@hyunchel I posted some comments on how to make the types more precise. |
Type of parameter for function `is_recent`(line no.812) is `datetime`. MyPy errors out, however, when the parameter is defined as `datetime`. To get around, type `Any` is used.
6120396
to
a84fae2
Compare
@timabbott Changes based on your review are applied and force pushed. |
Type check for
(line no.819) |
Merged, thanks @hyunchel! |
Type of parameter for function
is_recent
(line no.812) isdatetime
.MyPy errors out, however, when the parameter is defined as
datetime
.To get around, type
Any
is used.