Skip to content

Return type annotation - #16359

Merged
rmlarsen merged 2 commits into
tensorflow:masterfrom
ngc92:return_type_annotation
Jan 24, 2018
Merged

rmlarsen merged 2 commits into
tensorflow:masterfrom
ngc92:return_type_annotation

Conversation

@ngc92

@ngc92 ngc92 commented Jan 24, 2018

Copy link
Copy Markdown
Contributor

Added type annotations in the docstring to the return types of dataset functions.
Presented like this, they can automatically be read by tools (I have tested that this works in PyCharm) to improve auto-completion when coding.

This is really useful in case of datasets, because they often result in long chained calls (something like Dataset.generate...(...).map(...).repeat(...).batch(...)). With this patch, code completion works after every . (again, I have only tested PyCharm).

@rmlarsen

Copy link
Copy Markdown
Contributor

@ngc92 thanks for the cleanup.

@rmlarsen rmlarsen added the kokoro:force-run Tests on submitted change label Jan 24, 2018
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Jan 24, 2018
@rmlarsen
rmlarsen merged commit 23ed83d into tensorflow:master Jan 24, 2018
@ngc92
ngc92 deleted the return_type_annotation branch January 24, 2018 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants