Fixes #2858#2859
Conversation
|
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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| 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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
||
| :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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| :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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
||
| :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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| """ | ||
| 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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| 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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
language/unit_tests/test_syntax.py
Outdated
| 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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
Not sure if I did the pydoc stuff right.