Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jmdobry
Copy link
Contributor

@jmdobry jmdobry commented Dec 12, 2016

Not sure if I did the pydoc stuff right.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 12, 2016
@jmdobry
Copy link
Contributor Author

jmdobry commented Dec 12, 2016

Not sure why the build is failing, but I suspect it's something related to the pydoc (or docstring, or whatever you call it)

document according to the encoding type specified
in the API request.
:type sentiment: :class:`.Sentiment`

This comment was marked as spam.

This comment was marked as spam.

in the API request.
:type sentiment: :class:`.Sentiment`
:param sentiment: For calls to `analyzeSentiment`_ or if

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

:type sentiment: :class:`.Sentiment`
:param sentiment: For calls to `analyzeSentiment`_ or if
`include_sentiment` is set to true, this field will

This comment was marked as spam.

This comment was marked as spam.

@daspecster
Copy link
Contributor

@jmdobry thanks for the PR!

Looks like just one of the Travis issues is from the docstring that I noted in the review.
The rest are issues that were introduced by some Python3 issues. See: #2856.

@jmdobry
Copy link
Contributor Author

jmdobry commented Dec 13, 2016

There's a final line-too-long lint error I'm not sure what to do about.

:param sentiment: For calls to
:func:`~google.cloud.language.document.Document.annotate_text`
where ``include_sentiment`` is set to true, this field
will contain the sentiment for the sentence.

This comment was marked as spam.

This comment was marked as spam.

@daspecster
Copy link
Contributor

Thanks @jmdobry!

@tseaver I think it might be good to squash merge this if it looks good to you.

:type sentiment: :class:`~google.cloud.language.sentiment.Sentiment`
:param sentiment:
For calls to
:func:`~google.cloud.language.document.Document.annotate_text` where

This comment was marked as spam.

This comment was marked as spam.

:type sentiment: :class:`~google.cloud.language.sentiment.Sentiment`
:param sentiment:
For calls to

This comment was marked as spam.

This comment was marked as spam.

"""
text_span = payload['text']
return cls(text_span['content'], text_span['beginOffset'])
sentiment = payload['sentiment'] if 'sentiment' in payload else None

This comment was marked as spam.

This comment was marked as spam.

self.assertEqual(sentence.begin, begin)
self.assertEqual(sentence.sentiment, None)

score = 0.5

This comment was marked as spam.

This comment was marked as spam.

self.assertEqual(sentence.begin, begin)

def test_from_api_repr(self):
from google.cloud.language.sentiment import Sentiment

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor

dhermes commented Dec 14, 2016

W:116, 8: Unused variable 'Sentiment' (unused-variable) is the only remaining lint error. w00t

@dhermes dhermes merged commit 6bc1f8b into googleapis:master Dec 14, 2016
@jmdobry jmdobry deleted the sentence-sentiment branch December 14, 2016 20:21
richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants